GenerateDebugInfo("g",
llvm::cl::desc("Generate source level debug information"));
+
+//===----------------------------------------------------------------------===//
+// PTH.
+//===----------------------------------------------------------------------===//
+
+static llvm::cl::opt<std::string>
+TokenCache("token-cache", llvm::cl::value_desc("path"),
+ llvm::cl::desc("Use specified token cache file"));
+
//===----------------------------------------------------------------------===//
// Diagnostic Options
//===----------------------------------------------------------------------===//
PredefineBuffer.push_back(0);
PP.setPredefines(&PredefineBuffer[0]);
+ // Use PTH.
+ if (!TokenCache.empty()) {
+ PTHManager* PM = PTHManager::Create(TokenCache, PP);
+ if (PM) PP.setPTHManager(PM);
+ }
+
// Once we've read this, we're done.
return false;
}