summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
committerpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
commit53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch)
tree7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp
parentIn preparation of compiling our kernels with -ffreestanding, explicitly map (diff)
downloadwireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz
wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp')
-rw-r--r--gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp b/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp
index 71446fd4d79..1d2a50c8bc2 100644
--- a/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp
+++ b/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp
@@ -11,9 +11,10 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Frontend/CompilerInstance.h"
-#include "clang/CodeGen/CodeGenAction.h"
#include "clang/CodeGen/BackendUtil.h"
+#include "clang/CodeGen/CodeGenAction.h"
+#include "clang/Frontend/CompilerInstance.h"
+#include "clang/Lex/PreprocessorOptions.h"
#include "gtest/gtest.h"
using namespace llvm;
@@ -40,7 +41,7 @@ public:
TEST(CodeGenTest, TestNullCodeGen) {
- CompilerInvocation *Invocation = new CompilerInvocation;
+ auto Invocation = std::make_shared<CompilerInvocation>();
Invocation->getPreprocessorOpts().addRemappedFile(
"test.cc",
MemoryBuffer::getMemBuffer("").release());
@@ -49,7 +50,7 @@ TEST(CodeGenTest, TestNullCodeGen) {
Invocation->getFrontendOpts().ProgramAction = EmitLLVM;
Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
CompilerInstance Compiler;
- Compiler.setInvocation(Invocation);
+ Compiler.setInvocation(std::move(Invocation));
Compiler.createDiagnostics();
EXPECT_TRUE(Compiler.hasDiagnostics());