aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-30 22:59:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-30 22:59:32 +0000
commit0ec89f928ce5b3294c2ed644ec1a42656e1af39d (patch)
treea1d142a2a104671fac18cb81e1ce3774aacb9cd8 /lib/CodeGen/CGDecl.cpp
parenta9de3fa8a9c22dd419eda9be53e8c7c428cce1c0 (diff)
Add support for declaring register contraints in variables. They are only used
in asm statements: register int foo asm("rdi"); asm("..." : ... "r" (foo) ... We also only accept these variables if the constraint in the asm statement is "r". This fixes most of PR3933. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 2c54332185..77984b11cc 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -104,9 +104,6 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
/// EmitVarDecl - This method handles emission of any variable declaration
/// inside a function, including static vars etc.
void CodeGenFunction::EmitVarDecl(const VarDecl &D) {
- if (D.hasAttr<AsmLabelAttr>())
- CGM.ErrorUnsupported(&D, "__asm__");
-
switch (D.getStorageClass()) {
case SC_None:
case SC_Auto: