summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.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
commit0a7b297d01812a26d9aea2ec332dc8472928e88b (patch)
tree76494ae8181ea78992e67c5fee55371437de8124 /clang/lib/Frontend/CompilerInstance.cpp
parentdcac0a3b5e0032e5b2e11c4001550abfbad042bc (diff)
downloadbcm5719-llvm-0a7b297d01812a26d9aea2ec332dc8472928e88b.tar.gz
bcm5719-llvm-0a7b297d01812a26d9aea2ec332dc8472928e88b.zip
Factor out Clang's desired 8MB stack size constant from the various
places we hardcode it. llvm-svn: 336231
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index d9900867d88..c4863d6c03d 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -16,6 +16,7 @@
#include "clang/Basic/FileManager.h"
#include "clang/Basic/MemoryBufferCache.h"
#include "clang/Basic/SourceManager.h"
+#include "clang/Basic/Stack.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Version.h"
#include "clang/Config/config.h"
@@ -1164,14 +1165,13 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc,
// Execute the action to actually build the module in-place. Use a separate
// thread so that we get a stack large enough.
- const unsigned ThreadStackSize = 8 << 20;
llvm::CrashRecoveryContext CRC;
CRC.RunSafelyOnThread(
[&]() {
GenerateModuleFromModuleMapAction Action;
Instance.ExecuteAction(Action);
},
- ThreadStackSize);
+ DesiredStackSize);
PostBuildStep(Instance);
OpenPOWER on IntegriCloud