Make mangling work with anonymous tag types. Doug, please review

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66353 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index 7b92c85..1c98df5 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -1,9 +1,21 @@
-// RUN: clang -emit-llvm %s -o - | grep _ZplRK1YRA100_P1X
+// RUN: clang -emit-llvm %s -o %t &&
 
 // FIXME: This test is intentionally trivial, because we can't yet
 // CodeGen anything real in C++.
 struct X { };
 struct Y { };
-  
+
+// RUN: grep _ZplRK1YRA100_P1X %t | count 1 &&
 bool operator+(const Y&, X* (&xs)[100]) { return false; }
 
+// RUN: grep _Z1f1s %t | count 1 &&
+typedef struct { int a; } s;
+void f(s) { }
+
+// RUN: grep _Z1f1e %t| count 1 &&
+typedef enum { foo } e;
+void f(e) { }
+
+// RUN: grep _Z1f1u %t | count 1
+typedef union { int a; } u;
+void f(u) { }