Import Cobalt 19.master.0.203780
Includes the following patches:
https://cobalt-review.googlesource.com/c/cobalt/+/5210
by errong.leng@samsung.com
https://cobalt-review.googlesource.com/c/cobalt/+/5270
by linus.wang@samsung.com
diff --git a/src/third_party/llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp b/src/third_party/llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
new file mode 100644
index 0000000..59e8b0b
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm -o - | FileCheck %s
+
+struct A {
+ virtual void __fastcall f(int a, int b);
+};
+void (__fastcall A::*doit())(int, int) {
+ return &A::f;
+}
+
+// CHECK: define linkonce_odr x86_fastcallcc void @"??_9A@@$BA@AI"(%struct.A* inreg %this, ...) {{.*}} comdat align 2 {
+// CHECK: [[VPTR:%.*]] = getelementptr inbounds void (%struct.A*, ...)*, void (%struct.A*, ...)** %{{.*}}, i64 0
+// CHECK: [[CALLEE:%.*]] = load void (%struct.A*, ...)*, void (%struct.A*, ...)** [[VPTR]]
+// CHECK: musttail call x86_fastcallcc void (%struct.A*, ...) [[CALLEE]](%struct.A* inreg %{{.*}}, ...)
+// CHECK: ret void
+// CHECK: }