Revert 125820 and 125819 to fix PR9266.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index cd23811..f809c00 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -14,7 +14,6 @@
#include "CGDebugInfo.h"
#include "CodeGenModule.h"
#include "CodeGenFunction.h"
-#include "TargetInfo.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Basic/PrettyStackTrace.h"
#include "clang/Basic/TargetInfo.h"
@@ -1136,8 +1135,8 @@
}
}
if (const llvm::Type* AdjTy =
- getTargetHooks().adjustInlineAsmType(*this, OutputConstraint,
- ResultRegTypes.back()))
+ Target.adjustInlineAsmType(OutputConstraint, ResultRegTypes.back(),
+ getLLVMContext()))
ResultRegTypes.back() = AdjTy;
} else {
ArgTypes.push_back(Dest.getAddress()->getType());
@@ -1208,8 +1207,8 @@
}
}
if (const llvm::Type* AdjTy =
- getTargetHooks().adjustInlineAsmType(*this, InputConstraint,
- Arg->getType()))
+ Target.adjustInlineAsmType(InputConstraint, Arg->getType(),
+ getLLVMContext()))
Arg = Builder.CreateBitCast(Arg, AdjTy);
ArgTypes.push_back(Arg->getType());