|
@@ -53,6 +53,10 @@ static cl::opt<cl::boolOrDefault>
|
|
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
|
|
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
|
|
cl::init(cl::BOU_UNSET));
|
|
cl::init(cl::BOU_UNSET));
|
|
|
|
|
|
|
|
+static cl::opt<bool>
|
|
|
|
+NoIntegratedAssembler("no-integrated-as", cl::Hidden,
|
|
|
|
+ cl::desc("Disable integrated assembler"));
|
|
|
|
+
|
|
static bool getVerboseAsm() {
|
|
static bool getVerboseAsm() {
|
|
switch (AsmVerbose) {
|
|
switch (AsmVerbose) {
|
|
case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault();
|
|
case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault();
|
|
@@ -63,14 +67,20 @@ static bool getVerboseAsm() {
|
|
}
|
|
}
|
|
|
|
|
|
void LLVMTargetMachine::initAsmInfo() {
|
|
void LLVMTargetMachine::initAsmInfo() {
|
|
- AsmInfo = TheTarget.createMCAsmInfo(*getRegisterInfo(), TargetTriple);
|
|
|
|
|
|
+ MCAsmInfo *TmpAsmInfo = TheTarget.createMCAsmInfo(*getRegisterInfo(),
|
|
|
|
+ TargetTriple);
|
|
// TargetSelect.h moved to a different directory between LLVM 2.9 and 3.0,
|
|
// 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
|
|
// and if the old one gets included then MCAsmInfo will be NULL and
|
|
// we'll crash later.
|
|
// we'll crash later.
|
|
// Provide the user with a useful error message about what's wrong.
|
|
// Provide the user with a useful error message about what's wrong.
|
|
- assert(AsmInfo && "MCAsmInfo not initialized. "
|
|
|
|
|
|
+ assert(TmpAsmInfo && "MCAsmInfo not initialized. "
|
|
"Make sure you include the correct TargetSelect.h"
|
|
"Make sure you include the correct TargetSelect.h"
|
|
"and that InitializeAllTargetMCs() is being invoked!");
|
|
"and that InitializeAllTargetMCs() is being invoked!");
|
|
|
|
+
|
|
|
|
+ if (NoIntegratedAssembler)
|
|
|
|
+ TmpAsmInfo->setUseIntegratedAssembler(false);
|
|
|
|
+
|
|
|
|
+ AsmInfo = TmpAsmInfo;
|
|
}
|
|
}
|
|
|
|
|
|
LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
|
|
LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
|