summaryrefslogtreecommitdiffstats
path: root/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-07-03 21:34:13 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-07-03 21:34:13 +0000
commit1faea10f9051a30ea0441599659f9798d835dbf1 (patch)
tree1c319bd898a3a7319e23ef6630cf813f746d91fb /lib/StaticAnalyzer/Frontend/ModelInjector.cpp
parent83dc9e5eeb282d9fea92251023c292c24d94fec7 (diff)
Factor out Clang's desired 8MB stack size constant from the various
places we hardcode it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Frontend/ModelInjector.cpp')
-rw-r--r--lib/StaticAnalyzer/Frontend/ModelInjector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Frontend/ModelInjector.cpp b/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
index 853aec2ea6..c43d30440c 100644
--- a/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
+++ b/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
@@ -10,6 +10,7 @@
#include "ModelInjector.h"
#include "clang/AST/Decl.h"
#include "clang/Basic/IdentifierTable.h"
+#include "clang/Basic/Stack.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendAction.h"
@@ -95,11 +96,10 @@ void ModelInjector::onBodySynthesis(const NamedDecl *D) {
ParseModelFileAction parseModelFile(Bodies);
- const unsigned ThreadStackSize = 8 << 20;
llvm::CrashRecoveryContext CRC;
CRC.RunSafelyOnThread([&]() { Instance.ExecuteAction(parseModelFile); },
- ThreadStackSize);
+ DesiredStackSize);
Instance.getPreprocessor().FinalizeForModelFile();