Skip to content

Commit a23b250

Browse files
committed
[lldb] Fix Microsoft guard variable detection
Apparently we need to check for a suffix, not a prefix. This broke probably broke expression evaluation on Windows. llvm-svn: 368695
1 parent ed9cc40 commit a23b250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static bool isGuardVariableSymbol(llvm::StringRef mangled_symbol,
160160
bool check_ms_abi = true) {
161161
bool result = mangled_symbol.startswith("_ZGV"); // Itanium ABI guard variable
162162
if (check_ms_abi)
163-
result |= mangled_symbol.startswith("@4IA"); // Microsoft ABI
163+
result |= mangled_symbol.endswith("@4IA"); // Microsoft ABI
164164
return result;
165165
}
166166

0 commit comments

Comments
 (0)