summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-02-12 15:39:20 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-02-12 15:39:20 +0000
commitabe212a3b80e5749d5ff8320301a8fc273c59d11 (patch)
treebf53fdf4db49321a741ad2d0023ae732ae543dce /llvm/lib/CodeGen
parent8ab205fb74b39da46e83dadbb91452e0ff186919 (diff)
downloadbcm5719-llvm-abe212a3b80e5749d5ff8320301a8fc273c59d11.tar.gz
bcm5719-llvm-abe212a3b80e5749d5ff8320301a8fc273c59d11.zip
Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
It introduced multiple test failures in the buildbots. llvm-svn: 201241
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp8
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp14
2 files changed, 4 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
index 66379d7ee9a..8badf429d2d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -79,14 +79,10 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
if (isNullTerminated)
Str = Str.substr(0, Str.size()-1);
- // If the output streamer does not have mature MC support or the integrated
- // assembler has been disabled, just emit the blob textually.
- // Otherwise parse the asm and emit it via MC support.
+ // If the output streamer is actually a .s file, just emit the blob textually.
// This is useful in case the asm parser doesn't handle something but the
// system assembler does.
- const MCAsmInfo *MCAI = TM.getMCAsmInfo();
- assert(MCAI && "No MCAsmInfo");
- if (!MCAI->useIntegratedAssembler()) {
+ if (OutStreamer.hasRawTextSupport()) {
OutStreamer.EmitRawText(Str);
emitInlineAsmEnd(TM.getSubtarget<MCSubtargetInfo>(), 0);
return;
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 51cd9d68617..d897757ab71 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -53,10 +53,6 @@ static cl::opt<cl::boolOrDefault>
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
cl::init(cl::BOU_UNSET));
-static cl::opt<bool>
-NoIntegratedAssembler("no-integrated-as", cl::Hidden,
- cl::desc("Disable integrated assembler"));
-
static bool getVerboseAsm() {
switch (AsmVerbose) {
case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault();
@@ -67,20 +63,14 @@ static bool getVerboseAsm() {
}
void LLVMTargetMachine::initAsmInfo() {
- MCAsmInfo *TmpAsmInfo = TheTarget.createMCAsmInfo(*getRegisterInfo(),
- TargetTriple);
+ AsmInfo = TheTarget.createMCAsmInfo(*getRegisterInfo(), TargetTriple);
// TargetSelect.h moved to a different directory between LLVM 2.9 and 3.0,
// and if the old one gets included then MCAsmInfo will be NULL and
// we'll crash later.
// Provide the user with a useful error message about what's wrong.
- assert(TmpAsmInfo && "MCAsmInfo not initialized. "
+ assert(AsmInfo && "MCAsmInfo not initialized. "
"Make sure you include the correct TargetSelect.h"
"and that InitializeAllTargetMCs() is being invoked!");
-
- if (NoIntegratedAssembler)
- TmpAsmInfo->setUseIntegratedAssembler(false);
-
- AsmInfo = TmpAsmInfo;
}
LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
OpenPOWER on IntegriCloud