aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-09 17:33:11 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-09 17:33:11 +0000
commitbe3d0dbf2e8d2f93191ff4c023dd3bbf8f859d5a (patch)
tree8fff916095bc0d0c708b6339eb571e84a984e543 /lib/Sema/SemaStmt.cpp
parent1a5d421c26e3dffce9dfc1aeca846167d7bb4068 (diff)
[ms-inline asm] Initialize targets and assembly printers/parsers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 7a37c1c786..260001dabb 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -32,6 +32,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/TargetSelect.h"
using namespace clang;
using namespace sema;
@@ -2887,6 +2888,11 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc,
// passed to the AsmParser.
(void)PatchedAsmString;
+ // Initialize targets and assembly printers/parsers.
+ llvm::InitializeAllTargetInfos();
+ llvm::InitializeAllTargetMCs();
+ llvm::InitializeAllAsmParsers();
+
MSAsmStmt *NS =
new (Context) MSAsmStmt(Context, AsmLoc, IsSimple, /* IsVolatile */ true,
AsmToks, LineEnds, AsmString, EndLoc);