search for: langopt

Displaying 20 results from an estimated 88 matches for "langopt".

Did you mean: langopts
2017 May 11
3
problem (and fix) with -fms-extensions
...1.1.1.4 InitPreprocessor.cpp --- lib/Frontend/InitPreprocessor.cpp 14 Mar 2017 08:07:56 -0000 1.1.1.4 +++ lib/Frontend/InitPreprocessor.cpp 11 May 2017 17:54:41 -0000 @@ -366,6 +366,8 @@ static void InitializeStandardPredefined else Builder.defineMacro("__STDC_HOSTED__"); + if (LangOpts.MicrosoftMode) + Builder.defineMacro("__ms_extensions__", 1); if (!LangOpts.CPlusPlus) { if (LangOpts.C11) Builder.defineMacro("__STDC_VERSION__", "201112L"); -------------- next part -------------- Index: lib/Frontend/InitPreprocessor.cpp ==========...
2016 Sep 09
2
defaults for FP contraction [e.g. fused multiply-add]: suggestion and patch to be slightly more aggressive and to make Clang`s optimization settings closer to having the same meaning as when they are given to GCC [at least for "-O3"]
...rInvocation.cpp @@ -2437,6 +2437,13 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, if (Arch == llvm::Triple::spir || Arch == llvm::Triple::spir64) { Res.getDiagnosticOpts().Warnings.push_back("spir-compat"); } + + // If there will ever be e.g. "LangOpts.C", replace "LangOpts.C11 || LangOpts.C99" with "LangOpts.C" on the next line. + if ( (LangOpts.C11 || LangOpts.C99 || LangOpts.CPlusPlus) // ... + /*...*/ && ( CodeGenOptions::FPC_On == Res.getCodeGenOpts().getFPContractMode() ) // ... /...
2017 May 12
2
problem (and fix) with -fms-extensions
...essor.cpp 14 Mar 2017 08:07:56 -0000 1.1.1.4 > > +++ lib/Frontend/InitPreprocessor.cpp 11 May 2017 17:54:41 -0000 > > @@ -366,6 +366,8 @@ static void InitializeStandardPredefined > > else > > Builder.defineMacro("__STDC_HOSTED__"); > > > > + if (LangOpts.MicrosoftMode) > > + Builder.defineMacro("__ms_extensions__", 1); > > if (!LangOpts.CPlusPlus) { > > if (LangOpts.C11) > > Builder.defineMacro("__STDC_VERSION__", "201112L"); > > Looks fine to me, though you would also hav...
2016 Sep 11
3
defaults for FP contraction [e.g. fused multiply-add]: suggestion and patch to be slightly more aggressive and to make Clang`s optimization settings closer to having the same meaning as when they are given to GCC [at least for "-O3"]
On Sep 10, 2016, at 3:33 AM, Steve Canon <scanon at apple.com> wrote: >>> >>> Pretty much. In particular, imagine a user trying to debug an unexpected floating point result caused by conversion of a*b + c into fma(a, b, c). >> >> I think that’s unavoidable, because of the way the optimization levels work. Even fma contraction is on by default (something I’d
2015 Aug 11
2
NSW and ExtLdPromotion()
...motion, I am leaning to say Clang set nsw flag incorrectly, but please let me know if I was wrong. Here is the reduced testcase: long long foo(int *a) { long long c; c = *a * 1405; return c; } Clang emitted the following IR (It is done by EmitMUL() in CGExprScalar.cpp, while CGF.getLangOpts().getSignedOverflowBehavior()=LangOptions::SOB_Undefined and CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)=false): ; Function Attrs: nounwind readonly define i64 @foo(i32* nocapture readonly %a) #0 { entry: %0 = load i32* %a, align 4, !tbaa !1 %mul = mul nsw i32 %0, 1405 %co...
2012 Sep 21
2
[LLVMdev] Clang API parsing of the destructor
...= new clang::TextDiagnosticPrinter( llvm::outs(), diagnosticOptions); llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> pDiagIDs; clang::DiagnosticsEngine *pDiagnosticsEngine = new clang::DiagnosticsEngine(pDiagIDs, pTextDiagnosticPrinter); clang::LangOptions languageOptions; languageOptions.GNUMode = 1; languageOptions.CXXExceptions = 1; languageOptions.RTTI = 1; languageOptions.Bool = 1; languageOptions.CPlusPlus = 1; clang::FileSystemOptions fileSystemOptions; clang::FileManager fileManager(fileSystemOptions); cla...
2012 Jul 10
0
[LLVMdev] Unable to do even basic Clang tutorial
...DiagnosticOptions const&, bool)' tutorial1.cpp:(.text+0xd7): undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> const&, clang::DiagnosticConsumer*, bool)' tutorial1.cpp:(.text+0xf4): undefined reference to `clang::LangOptions::LangOptions()' tutorial1.cpp:(.text+0x125): undefined reference to `clang::FileManager::FileManager(clang::FileSystemOptions const&)' tutorial1.cpp:(.text+0x148): undefined reference to `clang::SourceManager::SourceManager(clang::DiagnosticsEngine&, clang::FileManager&)'...
2012 Jul 10
2
[LLVMdev] Unable to do even basic Clang tutorial
...mp;, bool)' > tutorial1.cpp:(.text+0xd7): undefined reference to > `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> > const&, clang::DiagnosticConsumer*, bool)' > tutorial1.cpp:(.text+0xf4): undefined reference to > `clang::LangOptions::LangOptions()' > tutorial1.cpp:(.text+0x125): undefined reference to > `clang::FileManager::FileManager(clang::FileSystemOptions const&)' > tutorial1.cpp:(.text+0x148): undefined reference to > `clang::SourceManager::SourceManager(clang::DiagnosticsEngine&, > cla...
2012 Jul 10
2
[LLVMdev] Unable to do even basic Clang tutorial
...mp;, bool)' > tutorial1.cpp:(.text+0xd7): undefined reference to > `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> > const&, clang::DiagnosticConsumer*, bool)' > tutorial1.cpp:(.text+0xf4): undefined reference to > `clang::LangOptions::LangOptions()' > tutorial1.cpp:(.text+0x125): undefined reference to > `clang::FileManager::FileManager(clang::FileSystemOptions const&)' > tutorial1.cpp:(.text+0x148): undefined reference to > `clang::SourceManager::SourceManager(clang::DiagnosticsEngine&, > cla...
2012 Sep 21
0
[LLVMdev] Clang API parsing of the destructor
...Printer( > llvm::outs(), > diagnosticOptions); > llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> pDiagIDs; > clang::DiagnosticsEngine *pDiagnosticsEngine = > new clang::DiagnosticsEngine(pDiagIDs, pTextDiagnosticPrinter); > > clang::LangOptions languageOptions; > languageOptions.GNUMode = 1; > languageOptions.CXXExceptions = 1; > languageOptions.RTTI = 1; > languageOptions.Bool = 1; > languageOptions.CPlusPlus = 1; > Don't do this, use CompilerInvocation::setLangDefaults. Your problem is prob...
2012 Jul 10
0
[LLVMdev] Unable to do even basic Clang tutorial
...DiagnosticOptions const&, bool)' tutorial1.cpp:(.text+0xd7): undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> const&, clang::DiagnosticConsumer*, bool)' tutorial1.cpp:(.text+0xf4): undefined reference to `clang::LangOptions::LangOptions()' tutorial1.cpp:(.text+0x125): undefined reference to `clang::FileManager::FileManager(clang::FileSystemOptions const&)' tutorial1.cpp:(.text+0x148): undefined reference to `clang::SourceManager::SourceManager(clang::DiagnosticsEngine&, clang::FileManager&)'...
2012 Jul 10
3
[LLVMdev] Unable to do even basic Clang tutorial
Add -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS to your compilation flag. On 7/10/2012 11:23 AM, NY Knicks Fan wrote: > Hi Ashok, > > I created a new Ubuntu 12.04 virtual machine and followed directions > except that I know use your cmake command instead of configure, and I > got the error below. > > Any help is very much appreciated. > > > $
2015 Jun 02
2
[LLVMdev] `Ty && "Trying to add a type that doesn't exist?
...alization(llvm::Module&) + 71 17 clang 0x0000000001e331cb llvm::legacy::PassManagerImpl::run(llvm::Module&) + 363 18 clang 0x000000000086a323 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 3491 19 clang 0x00000000008594ac clang::CodeGenAction::ExecuteAction() + 1676 20 clang 0x0000000000692e66 clang::FrontendAction::Execute() + 118 21 clang 0x000000000066d299 clan...
2015 May 19
2
[LLVMdev] Module crash when adding CallInst
...alization(llvm::Module&) + 69 10 clang 0x00000000011ca40d llvm::legacy::PassManagerImpl::run(llvm::Module&) + 813 11 clang 0x0000000001837fad clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 1629 12 clang 0x000000000182a47f 13 clang 0x0000000001bdf043 clang::ParseAST(clang::Sema&, bool, bool) + 483 14 clang 0x0000000001603ba6 clang::FrontendAction::Execute() + 1...
2015 Jun 04
2
[LLVMdev] `Ty && "Trying to add a type that doesn't exist?
...clang 0x0000000001e331cb >> llvm::legacy::PassManagerImpl::run(llvm::Module&) + 363 >> 18 clang 0x000000000086a323 >> clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions >> const&, clang::TargetOptions const&, clang::LangOptions const&, >> llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + >> 3491 >> 19 clang 0x00000000008594ac >> clang::CodeGenAction::ExecuteAction() + 1676 >> 20 clang 0x0000000000692e66 clang::FrontendAction::Execute() + &...
2015 Jun 04
2
[LLVMdev] `Ty && "Trying to add a type that doesn't exist?
...1cb >>>> llvm::legacy::PassManagerImpl::run(llvm::Module&) + 363 >>>> 18 clang 0x000000000086a323 >>>> clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions >>>> const&, clang::TargetOptions const&, clang::LangOptions const&, >>>> llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + >>>> 3491 >>>> 19 clang 0x00000000008594ac >>>> clang::CodeGenAction::ExecuteAction() + 1676 >>>> 20 clang 0x0000000000692...
2012 Oct 13
0
[LLVMdev] [cfe-dev] OpenMP support in CLANG: A proposal
...n "-fopenmp" option in Clang. Following files are changed in this patch. Please start going through this patch, and let me know comments. Meanwhile, I will prepare next patch. ========================================= #. clang/include/clang/Driver/Options.td #. clang/include/clang/Basic/LangOptions.def #. clang/include/clang/Basic/DiagnosticLexKinds.td #. clang/lib/Driver/Tools.cpp #. clang/lib/Frontend/CompilerInvocation.cpp ========================================= -- mahesha On Sat, Oct 13, 2012 at 3:39 PM, Eli Friedman <eli.friedman at gmail.com> wrote: > On Sat, Oct 13...
2013 Dec 04
2
[LLVMdev] DwarfDebug problems
...mp;) + 713 > 13 clang-3.4 0x0000000103f12f5d llvm::legacy::PassManager::run(llvm::Module&) + 13 > 14 clang-3.4 0x0000000104230b3e clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 5790 > 15 clang-3.4 0x000000010431b9a7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 455 > 16 clang-3.4 0x00000001044a7644 clang::ParseAST(clang::Sema&, bool,...
2016 Apr 27
2
Assertion in MachineScheduler.cpp
...24 clang-3.5 0x00000000014db971 llvm::legacy::PassManager::run(llvm::Module&) + 39 25 clang-3.5 0x0000000001ef9c4b 26 clang-3.5 0x0000000001ef9d1a clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 127 27 clang-3.5 0x0000000001ef3637 28 clang-3.5 0x000000000276b1ea clang::ParseAST(clang::Sema&, bool, bool) + 780 29 clang-3.5 0x00000000019992b0 clang::ASTFrontendAction::ExecuteActi...
2011 Dec 06
2
[LLVMdev] Assertion `PI && "Expected required passes to be initialized"' failed for AliasAnalysis.
...ea6 llvm::PassManagerBuilder::addExtensionsToPM(llvm::PassManagerBuilder::ExtensionPointTy, llvm::PassManagerBase&) const + 406 9 clang 0x000000000083b5e1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 897 10 clang 0x0000000000838f61 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 353 11 clang 0x0000000000986caf clang::ParseAST(clang::Sema&, bool) + 511 12 clang 0x0...