зеркало из https://github.com/microsoft/clang-1.git
"Implement" codegen support for __noop().
Eli discovered that __noop's sema behavior also needs some love. I filed PR14081 for that and intend to improve it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
43085815b1
Коммит
27844533aa
|
@ -1321,6 +1321,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
llvm::StringRef Str = cast<StringLiteral>(AnnotationStrExpr)->getString();
|
||||
return RValue::get(EmitAnnotationCall(F, AnnVal, Str, E->getExprLoc()));
|
||||
}
|
||||
case Builtin::BI__noop:
|
||||
return RValue::get(0);
|
||||
}
|
||||
|
||||
// If this is an alias for a lib function (e.g. __builtin_sin), emit
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// RUN: %clang_cc1 -triple i686-pc-win32 -emit-llvm %s -o - | FileCheck %s
|
||||
|
||||
class A {
|
||||
public:
|
||||
~A() {}
|
||||
};
|
||||
|
||||
void f() {
|
||||
// CHECK: @_Z1fv
|
||||
// CHECK-NOT: call void @_ZN1AD1Ev
|
||||
// CHECK: ret void
|
||||
__noop(A());
|
||||
};
|
||||
|
Загрузка…
Ссылка в новой задаче