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
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
--- /dev/null
+// 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());
+};
+