Debug Info: Set the DICompileUnit's isOptimized flag when compiling with LTO.

rdar://problem/27640939

llvm-svn: 310147
diff --git a/clang/test/CodeGen/debug-info-lto.c b/clang/test/CodeGen/debug-info-lto.c
new file mode 100644
index 0000000..5dab0a1
--- /dev/null
+++ b/clang/test/CodeGen/debug-info-lto.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -flto -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s
+// RUN: %clang_cc1 -flto=thin -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s
+// The "o" in LTO stands for optimization!
+// CHECK: !DICompileUnit({{.*}} isOptimized: true