summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorJinsong Ji <jji@us.ibm.com>2021-07-02 15:46:49 +0000
committerJinsong Ji <jji@us.ibm.com>2021-07-02 16:12:21 +0000
commit03e9dcfd41d461633536690d1cc281e5f7300a3e (patch)
treed5bd981aff4bfc157a14f367dd88df9866c934c3 /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parentbf64210fd88f4f3fe920376861b418be1834add6 (diff)
[AIX] Use AsmParser to do inline asm parsing
Add a flag so that target can choose to use AsmParser for parsing inline asm. And set the flag by default for AIX. -no-intergrated-as will override this default if specified explicitly. Reviewed By: #powerpc, shchenz Differential Revision: https://reviews.llvm.org/D105314
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index f9b7bf613ff6..37c0b44ea2b2 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -64,8 +64,12 @@ void LLVMTargetMachine::initAsmInfo() {
if (Options.BinutilsVersion.first > 0)
TmpAsmInfo->setBinutilsVersion(Options.BinutilsVersion);
- if (Options.DisableIntegratedAS)
+ if (Options.DisableIntegratedAS) {
TmpAsmInfo->setUseIntegratedAssembler(false);
+ // If there is explict option disable integratedAS, we can't use it for
+ // inlineasm either.
+ TmpAsmInfo->setParseInlineAsmUsingAsmParser(false);
+ }
TmpAsmInfo->setPreserveAsmComments(Options.MCOptions.PreserveAsmComments);