]> granicus.if.org Git - clang/commitdiff
Fix the definition of JSONAnchorSource. MSVC mangles variable symbols, and "volatile...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 24 Aug 2012 10:39:28 +0000 (10:39 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 24 Aug 2012 10:39:28 +0000 (10:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162550 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/JSONCompilationDatabase.cpp

index c7cc38a31f41b5732b18b22c31262340376ec171..1c3cd8427c2c0bf23e25a2bcc930a4c0c44f6a59 100644 (file)
@@ -129,7 +129,7 @@ X("json-compilation-database", "Reads JSON formatted compilation databases");
 
 // This anchor is used to force the linker to link in the generated object file
 // and thus register the JSONCompilationDatabasePlugin.
-int JSONAnchorSource = 0;
+volatile int JSONAnchorSource = 0;
 
 JSONCompilationDatabase *
 JSONCompilationDatabase::loadFromFile(StringRef FilePath,