summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Use FPContractModeKind universallyAdam Nemet2017-03-291-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the front-end: * In FPOptions (i.e. in the Sema + in the expression nodes). * In LangOpts::DefaultFPContractMode which is the option that initializes FPOptions in the Sema. Another way to look at this change is that before fp-contractable on/off were the only states handled to the front-end: * For "on", FMA folding was performed by the front-end * For "fast", we simply forwarded the flag to TargetOptions to handle it in LLVM Now off/on/fast are all exposed because for fast we will generate fast-math-flags during CodeGen. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. Differential Revision: https://reviews.llvm.org/D31167 llvm-svn: 299027
* [PCH] Attach instance's dependency collectors to PCH external AST sources.Graydon Hoare2017-03-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When a PCH is included via -include-pch, clang should treat the current TU as dependent on the sourcefile that the PCH was generated from. This is currently _partly_ accomplished by InitializePreprocessor calling AddImplicitIncludePCH to synthesize an implicit #include of the sourcefile, into the preprocessor's Predefines buffer. For FrontendActions such as PreprocessOnlyAction (which is, curiously, what the driver winds up running one of in response to a plain clang -M) this is sufficient: the preprocessor cranks over its Predefines and emits a dependency reference to the initial sourcefile. For other FrontendActions (for example -emit-obj or -fsyntax-only) the Predefines buffer is reset to the suggested predefines buffer from the PCH, so the dependency edge is lost. The result is that clang emits a .d file in those cases that lacks a reference to the .h file responsible for the input (and in Swift's case, our .swiftdeps file winds up not including a reference to the source file for a PCH bridging header.) This patch fixes the problem by taking a different tack: ignoring the Predefines buffer (which seems a bit like a hack anyways) and directly attaching the CompilerInstance's DependencyCollectors (and legacy DependencyFileGenerator) to the ASTReader for the external AST. This approach is similar to the one chosen in earlier consultation with Bruno and Ben, and I think it's the least-bad solution, given several options. Reviewers: bruno, benlangmuir, doug.gregor Reviewed By: bruno, doug.gregor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31378 llvm-svn: 299009
* Encapsulate FPOptions and use it consistentlyAdam Nemet2017-03-272-2/+2
| | | | | | | | | | | | | | | | | | Sema holds the current FPOptions which is adjusted by 'pragma STDC FP_CONTRACT'. This then gets propagated into expression nodes as they are built. This encapsulates FPOptions so that this propagation happens opaquely rather than directly with the fp_contractable on/off bit. This allows controlled transitioning of fp_contractable to a ternary value (off, on, fast). It will also allow adding more fast-math flags later. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. Differential Revision: https://reviews.llvm.org/D31166 llvm-svn: 298877
* [OpenCL] Extended mapping of parcing CodeGen argumentsEgor Churaev2017-03-271-2/+6
| | | | | | | | | | | | | | Summary: Enable cl_mad_enamle and cl_no_signed_zeros options when user turns on cl_unsafe_math_optimizations or cl_fast_relaxed_math options. Reviewers: Anastasia, cfe-commits Reviewed By: Anastasia Subscribers: bader, yaxunl Differential Revision: https://reviews.llvm.org/D31324 llvm-svn: 298838
* [OpenCL][Bug 10573] Don't set CXXOperatorNames flagAnastasia Stulova2017-03-241-1/+0
| | | | | | | | | The flag CXXOperatorNames was overwritten unconditionally after being set for OpenCL. There seems to be no necessity to set it, so removing the line. llvm-svn: 298709
* [ThinLTO] Clang support for emitting minimized bitcode for thin linkTeresa Johnson2017-03-231-0/+1
| | | | | | | | | | | | | | | | | Summary: Clang companion patch to LLVM patch D31027, which adds support for emitting minimized bitcode file for use in the thin link step. Add a cc1 option -fthin-link-bitcode=<file> to trigger this behavior. Depends on D31027. Reviewers: mehdi_amini, pcc Subscribers: cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D31050 llvm-svn: 298639
* Move setting of LangOpts based on target flags out of CompilerInstanceEric Christopher2017-03-221-6/+0
| | | | | | | | | and into TargetInfo::adjust so that it gets called in more places throughout the compiler (AST serialization in particular). Should fix PPC modules after removing of faltivec. llvm-svn: 298487
* Remove the -faltivec alias option and replace it with -maltivec everywhere.Eric Christopher2017-03-212-3/+6
| | | | | | | | | | | The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec. Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly. llvm-svn: 298449
* Add a function to MD5 a file's contents.Zachary Turner2017-03-201-2/+2
| | | | | | | | | | | | | | | In doing so, clean up the MD5 interface a little. Most existing users only care about the lower 8 bytes of an MD5, but for some users that care about the upper and lower, there wasn't a good interface. Furthermore, consumers of the MD5 checksum were required to handle endianness details on their own, so it seems reasonable to abstract this into a nicer interface that just gives you the right value. Differential Revision: https://reviews.llvm.org/D31105 llvm-svn: 298322
* Bump __cplusplus for C++17 to 201703L per the C++17 DIS.Richard Smith2017-03-201-2/+4
| | | | llvm-svn: 298299
* Reapply "Modules: Cache PCMs in memory and avoid a use-after-free"Duncan P. N. Exon Smith2017-03-202-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r298185, effectively reapplying r298165, after fixing the new unit tests (PR32338). The memory buffer generator doesn't null-terminate the MemoryBuffer it creates; this version of the commit informs getMemBuffer about that to avoid the assert. Original commit message follows: ---- Clang's internal build system for implicit modules uses lock files to ensure that after a process writes a PCM it will read the same one back in (without contention from other -cc1 commands). Since PCMs are read from disk repeatedly while invalidating, building, and importing, the lock is not released quickly. Furthermore, the LockFileManager is not robust in every environment. Other -cc1 commands can stall until timeout (after about eight minutes). This commit changes the lock file from being necessary for correctness to a (possibly dubious) performance hack. The remaining benefit is to reduce duplicate work in competing -cc1 commands which depend on the same module. Follow-up commits will change the internal build system to continue after a timeout, and reduce the timeout. Perhaps we should reconsider blocking at all. This also fixes a use-after-free, when one part of a compilation validates a PCM and starts using it, and another tries to swap out the PCM for something new. The PCMCache is a new type called MemoryBufferCache, which saves memory buffers based on their filename. Its ownership is shared by the CompilerInstance and ModuleManager. - The ModuleManager stores PCMs there that it loads from disk, never touching the disk if the cache is hot. - When modules fail to validate, they're removed from the cache. - When a CompilerInstance is spawned to build a new module, each already-loaded PCM is assumed to be valid, and is frozen to avoid the use-after-free. - Any newly-built module is written directly to the cache to avoid the round-trip to the filesystem, making lock files unnecessary for correctness. Original patch by Manman Ren; most testcases by Adrian Prantl! llvm-svn: 298278
* Revert "Modules: Cache PCMs in memory and avoid a use-after-free"Renato Golin2017-03-182-27/+10
| | | | | | This reverts commit r298165, as it broke the ARM builds. llvm-svn: 298185
* [Modules] In case of lock timeout, fallback and build moduleBruno Cardoso Lopes2017-03-181-5/+12
| | | | | | | | | | | | | | Duncan's r298165 introduced the PCMCache mechanism, which guarantees that locks aren't necessary anymore for correctness but only for performance, by avoiding building it twice when possible. Change the logic to avoid an error but actually build the module in case the timeout happens. Instead of an error, still emit a remark for debugging purposes. rdar://problem/30297862 llvm-svn: 298175
* Modules: Cache PCMs in memory and avoid a use-after-freeDuncan P. N. Exon Smith2017-03-172-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang's internal build system for implicit modules uses lock files to ensure that after a process writes a PCM it will read the same one back in (without contention from other -cc1 commands). Since PCMs are read from disk repeatedly while invalidating, building, and importing, the lock is not released quickly. Furthermore, the LockFileManager is not robust in every environment. Other -cc1 commands can stall until timeout (after about eight minutes). This commit changes the lock file from being necessary for correctness to a (possibly dubious) performance hack. The remaining benefit is to reduce duplicate work in competing -cc1 commands which depend on the same module. Follow-up commits will change the internal build system to continue after a timeout, and reduce the timeout. Perhaps we should reconsider blocking at all. This also fixes a use-after-free, when one part of a compilation validates a PCM and starts using it, and another tries to swap out the PCM for something new. The PCMCache is a new type called MemoryBufferCache, which saves memory buffers based on their filename. Its ownership is shared by the CompilerInstance and ModuleManager. - The ModuleManager stores PCMs there that it loads from disk, never touching the disk if the cache is hot. - When modules fail to validate, they're removed from the cache. - When a CompilerInstance is spawned to build a new module, each already-loaded PCM is assumed to be valid, and is frozen to avoid the use-after-free. - Any newly-built module is written directly to the cache to avoid the round-trip to the filesystem, making lock files unnecessary for correctness. Original patch by Manman Ren; most testcases by Adrian Prantl! llvm-svn: 298165
* Canonicalize the path provided by -fmodules-cache-path.Adrian Prantl2017-03-141-3/+16
| | | | | | | | | | | This fixes lookup mismatches that could happen when the module cache path contained a '/./' component. <rdar://problem/30413458> Differential Revision: https://reviews.llvm.org/D30915 llvm-svn: 297790
* Modules: Use hash of PCM content for SIGNATUREDuncan P. N. Exon Smith2017-03-133-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change ASTFileSignature from a random 32-bit number to the hash of the PCM content. - Move definition ASTFileSignature to Basic/Module.h so Module and ASTSourceDescriptor can use it. - Change the signature from uint64_t to std::array<uint32_t,5>. - Stop using (saving/reading) the size and modification time of PCM files when there is a valid SIGNATURE. - Add UNHASHED_CONTROL_BLOCK, and use it to store the SIGNATURE record and other records that shouldn't affect the hash. Because implicit modules reuses the same file for multiple levels of -Werror, this includes DIAGNOSTIC_OPTIONS and DIAG_PRAGMA_MAPPINGS. This helps to solve a PCH + implicit Modules dependency issue: PCH files are handled by the external build system, whereas implicit modules are handled by internal compiler build system. This prevents invalidating a PCH when the compiler overwrites a PCM file with the same content (modulo the diagnostic differences). Design and original patch by Manman Ren! llvm-svn: 297655
* [Linker] Provide callback for internalizationJonas Devlieghere2017-03-131-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D30738 llvm-svn: 297649
* Add -iframeworkwithsysroot compiler optionAlex Lorenz2017-03-131-0/+3
| | | | | | | | | | | | | This commit adds support for a new -iframeworkwithsysroot compiler option which allows the user to specify a framework path that can be prefixed with the sysroot. This option is similar to the -iwithsysroot option that exists to supplement -isystem. rdar://21316352 Differential Revision: https://reviews.llvm.org/D30183 llvm-svn: 297614
* Add -cc1 flag -ast-dump-all to perform an AST dump including entities that ↵Richard Smith2017-03-093-13/+29
| | | | | | haven't yet been deserialized. llvm-svn: 297412
* Use filename in linemarker when compiling preprocessed source (Revised)Taewook Oh2017-03-071-2/+46
| | | | | | | | | | | | | | | | Summary: This is a revised version of D28796. Included test is changed to resolve the target compatibility issue reported (rL293032). Reviewers: inglorion, dblaikie, echristo, aprantl, probinson Reviewed By: inglorion Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D30663 llvm-svn: 297194
* [PS4] Set our default dialect to C++11. NFC for other targets.Paul Robinson2017-03-011-1/+5
| | | | | | | Reapplies r296209 now that r296549 has fixed what really seems to be the last problematic test. llvm-svn: 296554
* [GeneratePCHAction] If preprocessor option 'AllowPCHWithCompilerErrors' is ↵Argyrios Kyrtzidis2017-02-271-1/+7
| | | | | | enabled, don't delete the produced PCH file if error diagnostics occurred. llvm-svn: 296320
* Add a cc1 flag for setting the existing Preprocessor option ↵Argyrios Kyrtzidis2017-02-271-0/+1
| | | | | | 'AllowPCHWithCompilerErrors'. llvm-svn: 296306
* [modules] For -module-file-info, print out the resource dir path, since it ↵Argyrios Kyrtzidis2017-02-251-0/+1
| | | | | | is included in the module hash. llvm-svn: 296261
* Revert r296209, still one more test to go.Paul Robinson2017-02-251-5/+1
| | | | llvm-svn: 296216
* [PS4] Set our default dialect to C++11. NFC for other targets.Paul Robinson2017-02-251-1/+5
| | | | llvm-svn: 296209
* Revert r291477 "[Frontend] Correct values of ATOMIC_*_LOCK_FREE to match ↵Hans Wennborg2017-02-241-4/+6
| | | | | | | | | builtin" It caused PR31864. There is a patch in progress to fix that, but let's revert in the meantime. llvm-svn: 296063
* [c++1z] Mark constexpr lambdas as done on status page and start advertisingRichard Smith2017-02-211-0/+1
| | | | | | | | them via feature test macro __cpp_constexpr. Thanks to Faisal for implementing this feature! llvm-svn: 295791
* Cache FileID when translating diagnostics in PCH filesErik Verbruggen2017-02-161-1/+6
| | | | | | | | | | | | | | | | | | | | Modules/preambles/PCH files can contain diagnostics, which, when used, are added to the current ASTUnit. For that to work, they are translated to use the current FileManager's FileIDs. When the entry is not the main file, all local source locations will be checked by a linear search. Now this is a problem, when there are lots of diagnostics (say, 25000) and lots of local source locations (say, 440000), and end up taking seconds when using such a preamble. The fix is to cache the last FileID, because many subsequent diagnostics refer to the same file. This reduces the time spent in ASTUnit::TranslateStoredDiagnostics from seconds to a few milliseconds for files with many slocs/diagnostics. This fixes PR31353. Differential Revision: https://reviews.llvm.org/D29755 llvm-svn: 295301
* Stop asserting when a meaningless -std= flag is passed for a non-compilationRichard Smith2017-02-141-2/+2
| | | | | | input kind; go back to silently ignoring the flag. llvm-svn: 295122
* [Driver] Report available language standards on user errorRichard Smith2017-02-141-49/+83
| | | | | | | | | In case user did not provide valid standard name for -std option, available values (with short description) will be reported. Patch by Paweł Żukowski! llvm-svn: 295113
* [c++1z] Add some more tests for class template argument deduction, addRichard Smith2017-02-141-0/+2
| | | | | | feature-test macro, and mark feature as done on status page. llvm-svn: 295011
* [ASTUnit] Clear out diagnostic state after creating the preamble.Benjamin Kramer2017-02-131-0/+2
| | | | | | | | If the preamble had diagnostic state this would leave behind invalid state in the DiagnosticsEngine and crash later. The test case runs into an assertion in DiagnosticsEngine::setSourceManager. llvm-svn: 294963
* [DebugInfo] Added support to Clang FE for generating debug info for ↵Amjad Aboud2017-02-091-0/+1
| | | | | | | | | | | preprocessor macros. Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info. Added CC1 "-debug-info-macro" flag that enables emitting macro debug info. Differential Revision: https://reviews.llvm.org/D16135 llvm-svn: 294637
* Initialize builtins during modular codegenDavid Blaikie2017-02-081-0/+3
| | | | llvm-svn: 294512
* Enable -dump-deserialized-decls and -error-on-deserialized-decl for modules.Vassil Vassilev2017-02-071-16/+22
| | | | llvm-svn: 294359
* Modules: Simplify CompilerInstance constructor, NFCDuncan P. N. Exon Smith2017-02-021-4/+1
| | | | | | | Initialize fields directly in header. Note that the ModuleManager field is an IntrusiveRefCntPtr, so there's no need for explicit initialization. llvm-svn: 293863
* [X86] Teach Clang about -mfentry flagNirav Dave2017-01-311-0/+1
| | | | | | | | | | | | Replace mcount calls with calls to fentry. Reviewers: hfinkel, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28001 llvm-svn: 293649
* [c-index-test] Provide capability to index module file imports and dump ↵Argyrios Kyrtzidis2017-01-301-0/+4
| | | | | | | | their input files. This ensures the capability to index a module file using an existing ASTReader from a compiler instance or ASTUnit. llvm-svn: 293461
* Prototype of modules codegenDavid Blaikie2017-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | First pass at generating weak definitions of inline functions from module files (& skipping (-O0) or emitting available_externally (optimizations) definitions where those modules are used). External functions defined in modules are emitted into the modular object file as well (this may turn an existing ODR violation (if that module were imported into multiple translations) into valid/linkable code). Internal symbols (static functions, for example) are not correctly supported yet. The symbol will be produced, internal, in the modular object - unreferenceable from the users. Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D28845 llvm-svn: 293456
* Pass a char instead of a string to the find function. clang-tidy: ↵Sylvestre Ledru2017-01-282-2/+2
| | | | | | performance-faster-string-find llvm-svn: 293379
* [CodeGen] [CUDA] Add the ability set default attrs on functions in linked ↵Justin Lebar2017-01-251-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modules. Summary: Now when you ask clang to link in a bitcode module, you can tell it to set attributes on that module's functions to match what we would have set if we'd emitted those functions ourselves. This is particularly important for fast-math attributes in CUDA compilations. Each CUDA compilation links in libdevice, a bitcode library provided by nvidia as part of the CUDA distribution. Without this patch, if we have a user-function F that is compiled with -ffast-math that calls a function G from libdevice, F will have the unsafe-fp-math=true (etc.) attributes, but G will have no attributes. Since F calls G, the inliner will merge G's attributes into F's. It considers the lack of an unsafe-fp-math=true attribute on G to be tantamount to unsafe-fp-math=false, so it "merges" these by setting unsafe-fp-math=false on F. This then continues up the call graph, until every function that (transitively) calls something in libdevice gets unsafe-fp-math=false set, thus disabling fastmath in almost all CUDA code. Reviewers: echristo Subscribers: hfinkel, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D28538 llvm-svn: 293097
* Revert "Use filename in linemarker when compiling preprocessed source"Diana Picus2017-01-251-46/+2
| | | | | | | | | | | | | | | | | | | | | This reverts commit r293004 because it broke the buildbots with "unknown CPU" errors. I tried to fix it in r293026, but that broke on Green Dragon with this kind of error: error: expected string not found in input // CHECK: l{{ +}}df{{ +}}*ABS*{{ +}}{{0+}}{{.+}}preprocessed-input.c{{$}} ^ <stdin>:2:1: note: scanning from here /Users/buildslave/jenkins/sharedspace/incremental@2/clang-build/tools/clang/test/Frontend/Output/preprocessed-input.c.tmp.o: file format Mach-O 64-bit x86-64 ^ <stdin>:2:67: note: possible intended match here /Users/buildslave/jenkins/sharedspace/incremental@2/clang-build/tools/clang/test/Frontend/Output/preprocessed-input.c.tmp.o: file format Mach-O 64-bit x86-64 I suppose this means that llvm-objdump doesn't support Mach-O, so the test should indeed check for linux (but not for x86). I'll leave it to someone that knows better. llvm-svn: 293032
* Use filename in linemarker when compiling preprocessed sourceDavid Callahan2017-01-251-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clang appears to always use name as specified on the command line, whereas gcc uses the name as specified in the linemarker at the first line when compiling a preprocessed source. This results mismatch between two compilers in FILE symbol table entry. This patch makes clang to resemble gcc's behavior in finding the original source file name and use it as an input file name. Even with this patch, values of FILE symbol table entry may still be different because clang uses dirname+basename for the entry whlie gcc uses basename only. I'll write a patch for that once this patch is committed. Reviewers: dblaikie, inglorion Reviewed By: inglorion Subscribers: inglorion, aprantl, bruno Differential Revision: https://reviews.llvm.org/D28796 llvm-svn: 293004
* [Frontend] The macro that describes the Objective-C bool type shouldAlex Lorenz2017-01-201-3/+5
| | | | | | | | | | be defined for non Objective-C code as well rdar://29794915 Differential Revision: https://reviews.llvm.org/D28349 llvm-svn: 292617
* Add -fdebug-info-for-profiling to emit more debug info for sample pgo ↵Dehao Chen2017-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | profile collection Summary: SamplePGO uses profile with debug info to collect profile. Unlike the traditional debugging purpose, sample pgo needs more accurate debug info to represent the profile. We add -femit-accurate-debug-info for this purpose. It can be combined with all debugging modes (-g, -gmlt, etc). It makes sure that the following pieces of info is always emitted: * start line of all subprograms * linkage name of all subprograms * standalone subprograms (functions that has neither inlined nor been inlined) The impact on speccpu2006 binary size (size increase comparing with -g0 binary, also includes data for -g binary, which does not change with this patch): -gmlt(orig) -gmlt(patched) -g 433.milc 4.68% 5.40% 19.73% 444.namd 8.45% 8.93% 45.99% 447.dealII 97.43% 115.21% 374.89% 450.soplex 27.75% 31.88% 126.04% 453.povray 21.81% 26.16% 92.03% 470.lbm 0.60% 0.67% 1.96% 482.sphinx3 5.77% 6.47% 26.17% 400.perlbench 17.81% 19.43% 73.08% 401.bzip2 3.73% 3.92% 12.18% 403.gcc 31.75% 34.48% 122.75% 429.mcf 0.78% 0.88% 3.89% 445.gobmk 6.08% 7.92% 42.27% 456.hmmer 10.36% 11.25% 35.23% 458.sjeng 5.08% 5.42% 14.36% 462.libquantum 1.71% 1.96% 6.36% 464.h264ref 15.61% 16.56% 43.92% 471.omnetpp 11.93% 15.84% 60.09% 473.astar 3.11% 3.69% 14.18% 483.xalancbmk 56.29% 81.63% 353.22% geomean 15.60% 18.30% 57.81% Debug info size change for -gmlt binary with this patch: 433.milc 13.46% 444.namd 5.35% 447.dealII 18.21% 450.soplex 14.68% 453.povray 19.65% 470.lbm 6.03% 482.sphinx3 11.21% 400.perlbench 8.91% 401.bzip2 4.41% 403.gcc 8.56% 429.mcf 8.24% 445.gobmk 29.47% 456.hmmer 8.19% 458.sjeng 6.05% 462.libquantum 11.23% 464.h264ref 5.93% 471.omnetpp 31.89% 473.astar 16.20% 483.xalancbmk 44.62% geomean 16.83% Reviewers: davidxl, andreadb, rob.lougher, dblaikie, echristo Reviewed By: dblaikie, echristo Subscribers: hfinkel, rob.lougher, andreadb, gbedwell, cfe-commits, probinson, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25435 llvm-svn: 292458
* Move vtable type metadata emission behind a cc1-level flag.Peter Collingbourne2017-01-181-0/+1
| | | | | | | | | | | | | In ThinLTO mode, type metadata will require the module to be written as a multi-module bitcode file, which is currently incompatible with the Darwin linker. It is also useful to be able to enable or disable multi-module bitcode for testing purposes. This introduces a cc1-level flag, -f{,no-}lto-unit, which is used by the driver to enable multi-module bitcode on all but Darwin+ThinLTO, and can also be used to enable/disable the feature manually. Differential Revision: https://reviews.llvm.org/D28877 llvm-svn: 292448
* [ASTUnit] Reset diag state when creating the ASTUnit.Benjamin Kramer2017-01-181-0/+1
| | | | | | A client could call this with a dirty diagnostic engine, don't crash. llvm-svn: 292406
* Fix PR31644 introduced by r287138 and add a regression test.Yaron Keren2017-01-141-2/+2
| | | | | | Thanks Dimitry Andric for the report and fix! llvm-svn: 292032
* unique_ptrify createDriverOptTableDavid Blaikie2017-01-131-1/+1
| | | | llvm-svn: 291919
OpenPOWER on IntegriCloud