diff options
| author | 2020-08-03 15:06:44 +0000 | |
|---|---|---|
| committer | 2020-08-03 15:06:44 +0000 | |
| commit | b64793999546ed8adebaeebd9d8345d18db8927d (patch) | |
| tree | 4357c27b561d73b0e089727c6ed659f2ceff5f47 /gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp | |
| parent | Add support for UTF-8 DISPLAY-HINTs with octet length. For now only (diff) | |
| download | wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.tar.xz wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.zip | |
Remove LLVM 8.0.1 files.
Diffstat (limited to 'gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp b/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp deleted file mode 100644 index d90c2bce2f6..00000000000 --- a/gnu/llvm/tools/clang/unittests/Frontend/CodeGenActionTest.cpp +++ /dev/null @@ -1,62 +0,0 @@ -//===- unittests/Frontend/CodeGenActionTest.cpp --- FrontendAction tests --===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Unit tests for CodeGenAction. -// -//===----------------------------------------------------------------------===// - -#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; -using namespace clang; -using namespace clang::frontend; - -namespace { - - -class NullCodeGenAction : public CodeGenAction { -public: - NullCodeGenAction(llvm::LLVMContext *_VMContext = nullptr) - : CodeGenAction(Backend_EmitMCNull, _VMContext) {} - - // The action does not call methods of ATContext. - void ExecuteAction() override { - CompilerInstance &CI = getCompilerInstance(); - if (!CI.hasPreprocessor()) - return; - if (!CI.hasSema()) - CI.createSema(getTranslationUnitKind(), nullptr); - } -}; - - -TEST(CodeGenTest, TestNullCodeGen) { - auto Invocation = std::make_shared<CompilerInvocation>(); - Invocation->getPreprocessorOpts().addRemappedFile( - "test.cc", - MemoryBuffer::getMemBuffer("").release()); - Invocation->getFrontendOpts().Inputs.push_back( - FrontendInputFile("test.cc", InputKind::CXX)); - Invocation->getFrontendOpts().ProgramAction = EmitLLVM; - Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu"; - CompilerInstance Compiler; - Compiler.setInvocation(std::move(Invocation)); - Compiler.createDiagnostics(); - EXPECT_TRUE(Compiler.hasDiagnostics()); - - std::unique_ptr<FrontendAction> Act(new NullCodeGenAction); - bool Success = Compiler.ExecuteAction(*Act); - EXPECT_TRUE(Success); -} - -} |
