r241620 - Wrap clang modules and pch files in an object file container.
Richard Smith
richard at metafoo.co.uk
Mon Jul 13 00:00:38 PDT 2015
I think you broke -ftime-report. Using it in a build that implicitly builds
a module results in this:
clang: for the -time-passes option: may only occur zero or one times!
... because initializing the backend multiple times sets the global
-time-passes option multiple times.
On Tue, Jul 7, 2015 at 1:11 PM, Adrian Prantl <aprantl at apple.com> wrote:
> Author: adrian
> Date: Tue Jul 7 15:11:29 2015
> New Revision: 241620
>
> URL: http://llvm.org/viewvc/llvm-project?rev=241620&view=rev
> Log:
> Wrap clang modules and pch files in an object file container.
> This patch adds ObjectFilePCHContainerOperations uses the LLVM backend
> to put the contents of a PCH into a __clangast section inside a COFF, ELF,
> or Mach-O object file container.
>
> This is done to facilitate module debugging by makeing it possible to
> store the debug info for the types defined by a module alongside the AST.
>
> rdar://problem/20091852
>
> Added:
> cfe/trunk/include/clang/CodeGen/ObjectFilePCHContainerOperations.h
> cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
> cfe/trunk/test/Modules/pch_container.m
> Modified:
> cfe/trunk/lib/Basic/FileManager.cpp
> cfe/trunk/lib/CodeGen/CMakeLists.txt
> cfe/trunk/lib/Frontend/PCHContainerOperations.cpp
> cfe/trunk/lib/Serialization/ASTReader.cpp
> cfe/trunk/test/ARCMT/check-with-pch.m
> cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m
> cfe/trunk/test/ARCMT/objcmt-with-pch.m
> cfe/trunk/test/ARCMT/objcmt-with-pch.m.result
> cfe/trunk/test/CMakeLists.txt
> cfe/trunk/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
> cfe/trunk/test/CodeGen/atomic-ops.c
> cfe/trunk/test/CodeGen/big-atomic-ops.c
> cfe/trunk/test/Frontend/ast-codegen.c
> cfe/trunk/test/Index/TestClassForwardDecl.m
> cfe/trunk/test/Index/c-index-api-loadTU-test.m
> cfe/trunk/test/Index/c-index-getCursor-test.m
> cfe/trunk/test/Index/pch-with-module.m
> cfe/trunk/test/Index/print-mangled-name.cpp
> cfe/trunk/test/Modules/compiler_builtins_arm.m
> cfe/trunk/test/Modules/dependency-gen-inferred-map.m
> cfe/trunk/test/Modules/dependency-gen-pch.m
> cfe/trunk/test/Modules/irgen.c
> cfe/trunk/test/Modules/self-import-header.m
> cfe/trunk/test/Modules/templates-2.mm
> cfe/trunk/test/Modules/templates.mm
> cfe/trunk/test/Modules/va_list.m
> cfe/trunk/test/OpenMP/atomic_read_codegen.c
> cfe/trunk/test/OpenMP/barrier_codegen.cpp
> cfe/trunk/test/OpenMP/critical_codegen.cpp
> cfe/trunk/test/OpenMP/flush_codegen.cpp
> cfe/trunk/test/OpenMP/for_codegen.cpp
> cfe/trunk/test/OpenMP/master_codegen.cpp
> cfe/trunk/test/OpenMP/parallel_codegen.cpp
> cfe/trunk/test/OpenMP/parallel_private_codegen.cpp
> cfe/trunk/test/OpenMP/simd_codegen.cpp
> cfe/trunk/test/OpenMP/single_codegen.cpp
> cfe/trunk/test/OpenMP/taskyield_codegen.cpp
> cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
> cfe/trunk/test/PCH/__va_list_tag.c
> cfe/trunk/test/PCH/arc.m
> cfe/trunk/test/PCH/asm.c
> cfe/trunk/test/PCH/chain-external-defs.c
> cfe/trunk/test/PCH/chain-trivial.c
> cfe/trunk/test/PCH/cxx-ms-function-specialization-class-scope.cpp
> cfe/trunk/test/PCH/external-defs.c
> cfe/trunk/test/PCH/floating-literal.c
> cfe/trunk/test/PCH/local_static.cpp
> cfe/trunk/test/PCH/pchpch.c
> cfe/trunk/test/PCH/reloc.c
> cfe/trunk/test/PCH/subscripting-literals.m
> cfe/trunk/test/PCH/target-options.c
> cfe/trunk/test/PCH/tentative-defs.c
> cfe/trunk/test/PCH/thread-local.cpp
> cfe/trunk/test/PCH/va_arg.c
> cfe/trunk/test/PCH/va_arg.cpp
> cfe/trunk/tools/clang-check/CMakeLists.txt
> cfe/trunk/tools/clang-check/ClangCheck.cpp
> cfe/trunk/tools/clang-check/Makefile
> cfe/trunk/tools/driver/cc1_main.cpp
> cfe/trunk/tools/libclang/CIndex.cpp
> cfe/trunk/tools/libclang/CMakeLists.txt
> cfe/trunk/tools/libclang/Makefile
>
> Added: cfe/trunk/include/clang/CodeGen/ObjectFilePCHContainerOperations.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/ObjectFilePCHContainerOperations.h?rev=241620&view=auto
>
> ==============================================================================
> --- cfe/trunk/include/clang/CodeGen/ObjectFilePCHContainerOperations.h
> (added)
> +++ cfe/trunk/include/clang/CodeGen/ObjectFilePCHContainerOperations.h Tue
> Jul 7 15:11:29 2015
> @@ -0,0 +1,43 @@
> +//===-- CodeGen/ObjectFilePCHContainerOperations.h - ------------*- C++
> -*-===//
> +//
> +// The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
>
> +//===----------------------------------------------------------------------===//
> +
> +#ifndef LLVM_CLANG_CODEGEN_OBJECT_FILE_PCH_CONTAINER_OPERATIONS_H
> +#define LLVM_CLANG_CODEGEN_OBJECT_FILE_PCH_CONTAINER_OPERATIONS_H
> +
> +#include "clang/Frontend/PCHContainerOperations.h"
> +
> +namespace clang {
> +
> +/// \brief A PCHContainerOperations implementation that uses LLVM to
> +/// wraps Clang modules inside a COFF, ELF, or Mach-O container.
> +class ObjectFilePCHContainerOperations
> + : public PCHContainerOperations {
> + /// \brief Return an ASTConsumer that can be chained with a
> + /// PCHGenerator that produces a wrapper file format
> + /// that also contains full debug info for the module.
> + std::unique_ptr<ASTConsumer>
> + CreatePCHContainerGenerator(
> + DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO,
> + const PreprocessorOptions &PPO, const TargetOptions &TO,
> + const LangOptions &LO, const std::string &MainFileName,
> + const std::string &OutputFileName, llvm::raw_pwrite_stream *OS,
> + std::shared_ptr<PCHBuffer> Buffer) const override;
> +
> + /// \brief Initialize an llvm::BitstreamReader with the serialized
> + /// AST inside the PCH container Buffer.
> + void ExtractPCH(llvm::MemoryBufferRef Buffer,
> + llvm::BitstreamReader &StreamFile) const override;
> +
> +
> +};
> +
> +}
> +
> +
> +#endif
>
> Modified: cfe/trunk/lib/Basic/FileManager.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Basic/FileManager.cpp (original)
> +++ cfe/trunk/lib/Basic/FileManager.cpp Tue Jul 7 15:11:29 2015
> @@ -19,6 +19,7 @@
>
> #include "clang/Basic/FileManager.h"
> #include "clang/Basic/FileSystemStatCache.h"
> +#include "clang/Frontend/PCHContainerOperations.h"
> #include "llvm/ADT/SmallString.h"
> #include "llvm/Config/llvm-config.h"
> #include "llvm/Support/FileSystem.h"
> @@ -585,3 +586,5 @@ void FileManager::PrintStats() const {
>
> //llvm::errs() << PagesMapped << BytesOfPagesMapped << FSLookups;
> }
> +
> +PCHContainerOperations::~PCHContainerOperations() {}
>
> Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CMakeLists.txt?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CMakeLists.txt (original)
> +++ cfe/trunk/lib/CodeGen/CMakeLists.txt Tue Jul 7 15:11:29 2015
> @@ -71,6 +71,7 @@ add_clang_library(clangCodeGen
> ItaniumCXXABI.cpp
> MicrosoftCXXABI.cpp
> ModuleBuilder.cpp
> + ObjectFilePCHContainerOperations.cpp
> SanitizerMetadata.cpp
> TargetInfo.cpp
>
>
> Added: cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=241620&view=auto
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp (added)
> +++ cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp Tue Jul 7
> 15:11:29 2015
> @@ -0,0 +1,198 @@
> +//===--- ObjectFilePCHContainerOperations.cpp
> -----------------------------===//
> +//
> +// The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
>
> +//===----------------------------------------------------------------------===//
> +
> +#include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
> +#include "CGDebugInfo.h"
> +#include "CodeGenModule.h"
> +#include "clang/AST/ASTContext.h"
> +#include "clang/AST/DeclObjC.h"
> +#include "clang/AST/Expr.h"
> +#include "clang/AST/RecursiveASTVisitor.h"
> +#include "clang/Basic/Diagnostic.h"
> +#include "clang/Basic/TargetInfo.h"
> +#include "clang/CodeGen/BackendUtil.h"
> +#include "clang/Frontend/CodeGenOptions.h"
> +#include "clang/Serialization/ASTWriter.h"
> +#include "llvm/ADT/StringRef.h"
> +#include "llvm/Bitcode/BitstreamReader.h"
> +#include "llvm/DebugInfo/DWARF/DWARFContext.h"
> +#include "llvm/IR/Constants.h"
> +#include "llvm/IR/DataLayout.h"
> +#include "llvm/IR/LLVMContext.h"
> +#include "llvm/IR/Module.h"
> +#include "llvm/Object/COFF.h"
> +#include "llvm/Object/ObjectFile.h"
> +#include "llvm/Support/TargetRegistry.h"
> +#include <memory>
> +using namespace clang;
> +
> +#define DEBUG_TYPE "pchcontainer"
> +
> +namespace {
> +class ModuleContainerGenerator : public ASTConsumer {
> + DiagnosticsEngine &Diags;
> + const std::string MainFileName;
> + ASTContext *Ctx;
> + const HeaderSearchOptions &HeaderSearchOpts;
> + const PreprocessorOptions &PreprocessorOpts;
> + CodeGenOptions CodeGenOpts;
> + const TargetOptions TargetOpts;
> + const LangOptions LangOpts;
> + std::unique_ptr<llvm::LLVMContext> VMContext;
> + std::unique_ptr<llvm::Module> M;
> + std::unique_ptr<CodeGen::CodeGenModule> Builder;
> + raw_pwrite_stream *OS;
> + std::shared_ptr<PCHBuffer> Buffer;
> +
> +public:
> + ModuleContainerGenerator(
> + DiagnosticsEngine &diags,
> + const HeaderSearchOptions &HSO, const PreprocessorOptions &PPO,
> + const TargetOptions &TO, const LangOptions &LO,
> + const std::string &MainFileName, const std::string &OutputFileName,
> + raw_pwrite_stream *OS, std::shared_ptr<PCHBuffer> Buffer)
> + : Diags(diags), HeaderSearchOpts(HSO), PreprocessorOpts(PPO),
> + TargetOpts(TO), LangOpts(LO), OS(OS),
> + Buffer(Buffer) {
> + // The debug info output isn't affected by CodeModel and
> + // ThreadModel, but the backend expects them to be nonempty.
> + CodeGenOpts.CodeModel = "default";
> + CodeGenOpts.ThreadModel = "single";
> + CodeGenOpts.setDebugInfo(CodeGenOptions::FullDebugInfo);
> + CodeGenOpts.SplitDwarfFile = OutputFileName;
> + }
> +
> + virtual ~ModuleContainerGenerator() {}
> +
> + void Initialize(ASTContext &Context) override {
> + Ctx = &Context;
> + VMContext.reset(new llvm::LLVMContext());
> + M.reset(new llvm::Module(MainFileName, *VMContext));
> + M->setDataLayout(Ctx->getTargetInfo().getTargetDescription());
> + Builder.reset(new CodeGen::CodeGenModule(*Ctx, HeaderSearchOpts,
> + PreprocessorOpts,
> CodeGenOpts,
> + *M, M->getDataLayout(),
> Diags));
> + }
> +
> + /// Emit a container holding the serialized AST.
> + void HandleTranslationUnit(ASTContext &Ctx) override {
> + assert(M && VMContext && Builder);
> + // Delete these on function exit.
> + std::unique_ptr<llvm::LLVMContext> VMContext =
> std::move(this->VMContext);
> + std::unique_ptr<llvm::Module> M = std::move(this->M);
> + std::unique_ptr<CodeGen::CodeGenModule> Builder =
> std::move(this->Builder);
> +
> + if (Diags.hasErrorOccurred())
> + return;
> +
> + M->setTargetTriple(Ctx.getTargetInfo().getTriple().getTriple());
> + M->setDataLayout(Ctx.getTargetInfo().getTargetDescription());
> +
> + // Finalize the Builder.
> + if (Builder)
> + Builder->Release();
> +
> + // Initialize the backend if we haven't done so already.
> + LLVMInitializeAllTargetInfos();
> + LLVMInitializeAllTargets();
> + LLVMInitializeAllAsmPrinters();
> + LLVMInitializeAllTargetMCs();
> +
> + // Ensure the target exists.
> + std::string Error;
> + auto Triple = Ctx.getTargetInfo().getTriple();
> + if (!llvm::TargetRegistry::lookupTarget(Triple.getTriple(), Error))
> + llvm::report_fatal_error(Error);
> +
> + // Emit the serialized Clang AST into its own section.
> + assert(Buffer->IsComplete && "serialization did not complete");
> + auto &SerializedAST = Buffer->Data;
> + auto Size = SerializedAST.size();
> + auto Int8Ty = llvm::Type::getInt8Ty(*VMContext);
> + auto *Ty = llvm::ArrayType::get(Int8Ty, Size);
> + auto *Data = llvm::ConstantDataArray::
> + getString(*VMContext, StringRef(SerializedAST.data(), Size),
> + /*AddNull=*/false);
> + auto *ASTSym = new llvm::GlobalVariable(
> + *M, Ty, /*constant*/ true, llvm::GlobalVariable::InternalLinkage,
> Data,
> + "__clang_ast");
> + // The on-disk hashtable needs to be aligned.
> + ASTSym->setAlignment(8);
> +
> + // Mach-O also needs a segment name.
> + if (Triple.isOSBinFormatMachO())
> + ASTSym->setSection("__CLANG,__clangast");
> + // COFF has an eight character length limit.
> + else if (Triple.isOSBinFormatCOFF())
> + ASTSym->setSection("clangast");
> + else
> + ASTSym->setSection("__clangast");
> +
> + DEBUG({
> + // Print the IR for the PCH container to the debug output.
> + llvm::SmallString<0> Buffer;
> + llvm::raw_svector_ostream OS(Buffer);
> + clang::EmitBackendOutput(Diags, CodeGenOpts, TargetOpts, LangOpts,
> +
> Ctx.getTargetInfo().getTargetDescription(),
> + M.get(), BackendAction::Backend_EmitLL,
> &OS);
> + OS.flush();
> + llvm::dbgs()<<Buffer;
> + });
> +
> + // Use the LLVM backend to emit the pch container.
> + clang::EmitBackendOutput(Diags, CodeGenOpts, TargetOpts, LangOpts,
> + Ctx.getTargetInfo().getTargetDescription(),
> + M.get(), BackendAction::Backend_EmitObj, OS);
> +
> + // Make sure the pch container hits disk.
> + OS->flush();
> +
> + // Free the memory for the temporary buffer.
> + llvm::SmallVector<char, 0> Empty;
> + SerializedAST = std::move(Empty);
> + }
> +};
> +}
> +
> +std::unique_ptr<ASTConsumer>
> +ObjectFilePCHContainerOperations::CreatePCHContainerGenerator(
> + DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO,
> + const PreprocessorOptions &PPO, const TargetOptions &TO,
> + const LangOptions &LO, const std::string &MainFileName,
> + const std::string &OutputFileName, llvm::raw_pwrite_stream *OS,
> + std::shared_ptr<PCHBuffer> Buffer) const {
> + return llvm::make_unique<ModuleContainerGenerator>
> + (Diags, HSO, PPO, TO, LO, MainFileName, OutputFileName, OS, Buffer);
> +}
> +
> +void ObjectFilePCHContainerOperations::ExtractPCH(
> + llvm::MemoryBufferRef Buffer, llvm::BitstreamReader &StreamFile)
> const {
> + if (auto OF = llvm::object::ObjectFile::createObjectFile(Buffer)) {
> + auto *Obj = OF.get().get();
> + bool IsCOFF = isa<llvm::object::COFFObjectFile>(Obj);
> + // Find the clang AST section in the container.
> + for (auto &Section : OF->get()->sections()) {
> + StringRef Name;
> + Section.getName(Name);
> + if ((!IsCOFF && Name == "__clangast") ||
> + ( IsCOFF && Name == "clangast")) {
> + StringRef Buf;
> + Section.getContents(Buf);
> + StreamFile.init((const unsigned char *)Buf.begin(),
> + (const unsigned char *)Buf.end());
> + return;
> + }
> + }
> + }
> +
> + // As a fallback, treat the buffer as a raw AST.
> + StreamFile.init((const unsigned char *)Buffer.getBufferStart(),
> + (const unsigned char *)Buffer.getBufferEnd());
> + return;
> +}
>
> Modified: cfe/trunk/lib/Frontend/PCHContainerOperations.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHContainerOperations.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Frontend/PCHContainerOperations.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHContainerOperations.cpp Tue Jul 7 15:11:29
> 2015
> @@ -18,8 +18,6 @@
> #include "clang/Lex/ModuleLoader.h"
> using namespace clang;
>
> -PCHContainerOperations::~PCHContainerOperations() {}
> -
> namespace {
>
> /// \brief A PCHContainerGenerator that writes out the PCH to a flat file.
>
> Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
> +++ cfe/trunk/lib/Serialization/ASTReader.cpp Tue Jul 7 15:11:29 2015
> @@ -3976,8 +3976,7 @@ bool ASTReader::readASTFileControlBlock(
>
> // Initialize the stream
> llvm::BitstreamReader StreamFile;
> - StreamFile.init((const unsigned char *)(*Buffer)->getBufferStart(),
> - (const unsigned char *)(*Buffer)->getBufferEnd());
> + PCHContainerOps.ExtractPCH((*Buffer)->getMemBufferRef(), StreamFile);
> BitstreamCursor Stream(StreamFile);
>
> // Sniff for the signature.
>
> Modified: cfe/trunk/test/ARCMT/check-with-pch.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/check-with-pch.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/ARCMT/check-with-pch.m (original)
> +++ cfe/trunk/test/ARCMT/check-with-pch.m Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,6 @@
> // RUN: %clang_cc1 -x objective-c -triple x86_64-apple-darwin10
> %S/Common.h -emit-pch -o %t.pch
> // RUN: %clang_cc1 -include-pch %t.pch -arcmt-check -verify -triple
> x86_64-apple-darwin10 -fblocks -Werror %s
> +// REQUIRES: x86-registered-target
>
> // rdar://9601437
> @interface I9601437 {
>
> Modified: cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m (original)
> +++ cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m Tue Jul 7 15:11:29
> 2015
> @@ -1,7 +1,7 @@
> // RUN: rm -rf %t-mcp
> // RUN: %clang_cc1 -objcmt-migrate-subscripting -emit-pch -o %t.pch %s
> -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -F %S/Inputs
> -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-mcp -w
> // RUN: %clang_cc1 -objcmt-migrate-subscripting -include-pch %t.pch %s
> -migrate -o %t.remap -isysroot %S/Inputs/System -triple
> x86_64-apple-darwin10 -F %S/Inputs -fmodules -fimplicit-module-maps
> -fmodules-cache-path=%t-mcp
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/ARCMT/objcmt-with-pch.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-with-pch.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/ARCMT/objcmt-with-pch.m (original)
> +++ cfe/trunk/test/ARCMT/objcmt-with-pch.m Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t
> // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c
> %S/Common.h -emit-pch -o %t.pch
> // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -objcmt-migrate-literals
> -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c
> -include-pch %t.pch
>
> Modified: cfe/trunk/test/ARCMT/objcmt-with-pch.m.result
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-with-pch.m.result?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/ARCMT/objcmt-with-pch.m.result (original)
> +++ cfe/trunk/test/ARCMT/objcmt-with-pch.m.result Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t
> // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c
> %S/Common.h -emit-pch -o %t.pch
> // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -objcmt-migrate-literals
> -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c
> -include-pch %t.pch
>
> Modified: cfe/trunk/test/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CMakeLists.txt (original)
> +++ cfe/trunk/test/CMakeLists.txt Tue Jul 7 15:11:29 2015
> @@ -58,7 +58,7 @@ set(CLANG_TEST_PARAMS
> if( NOT CLANG_BUILT_STANDALONE )
> list(APPEND CLANG_TEST_DEPS
> llvm-config
> - llc opt FileCheck count not llvm-symbolizer llvm-profdata
> + llc opt FileCheck count not llvm-symbolizer llvm-profdata llvm-objdump
> )
> endif()
>
>
> Modified: cfe/trunk/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
> (original)
> +++ cfe/trunk/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp Tue Jul
> 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple
> x86_64-apple-darwin10 -S -emit-llvm -std=c++11 -include %S/ser.h %s -o - |
> FileCheck %s
> // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple
> x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++11 -x c++ %S/ser.h
> // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple
> x86_64-apple-darwin10 -S -emit-llvm -std=c++11 -include-pch %t-ser.pch %s
> -o - | FileCheck %s
>
> Modified: cfe/trunk/test/CodeGen/atomic-ops.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/atomic-ops.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGen/atomic-ops.c (original)
> +++ cfe/trunk/test/CodeGen/atomic-ops.c Tue Jul 7 15:11:29 2015
> @@ -1,4 +1,5 @@
> // RUN: %clang_cc1 %s -emit-llvm -o - -ffreestanding
> -triple=i686-apple-darwin9 | FileCheck %s
> +// REQUIRES: x86-registered-target
>
> // Also test serialization of atomic operations here, to avoid
> duplicating the
> // test.
>
> Modified: cfe/trunk/test/CodeGen/big-atomic-ops.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/big-atomic-ops.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/CodeGen/big-atomic-ops.c (original)
> +++ cfe/trunk/test/CodeGen/big-atomic-ops.c Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,5 @@
> // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-macosx10.9.0 |
> FileCheck %s
> -
> +// REQUIRES: x86-registered-target
> // Also test serialization of atomic operations here, to avoid
> duplicating the
> // test.
> // RUN: %clang_cc1 %s -emit-pch -o %t -triple=x86_64-apple-macosx10.9.0
>
> Modified: cfe/trunk/test/Frontend/ast-codegen.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/ast-codegen.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Frontend/ast-codegen.c (original)
> +++ cfe/trunk/test/Frontend/ast-codegen.c Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: %clang -target i386-unknown-unknown -emit-ast -o %t.ast %s
> // RUN: %clang -target i386-unknown-unknown -emit-llvm -S -o - %t.ast |
> FileCheck %s
>
>
> Modified: cfe/trunk/test/Index/TestClassForwardDecl.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/TestClassForwardDecl.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Index/TestClassForwardDecl.m (original)
> +++ cfe/trunk/test/Index/TestClassForwardDecl.m Tue Jul 7 15:11:29 2015
> @@ -1,7 +1,7 @@
> // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-pch -x
> objective-c %s -o %t.ast
> // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck
> -check-prefix=CHECK-scan %s
> // RUN: c-index-test -test-load-tu %t.ast local | FileCheck
> -check-prefix=CHECK-load %s
> -
> +// REQUIRES: x86-registered-target
> // This test checks how the @class resolves as a cursor when the
> @interface is implicitly defined.
> // See TestClassDecl.m for the corresponding test case.
> (<rdar://problem/7383421>)
>
>
> Modified: cfe/trunk/test/Index/c-index-api-loadTU-test.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/c-index-api-loadTU-test.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Index/c-index-api-loadTU-test.m (original)
> +++ cfe/trunk/test/Index/c-index-api-loadTU-test.m Tue Jul 7 15:11:29 2015
> @@ -1,6 +1,6 @@
> // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-pch -x
> objective-c %s -o %t.ast
> // RUN: c-index-test -test-load-tu %t.ast all > %t 2>&1 && FileCheck
> --input-file=%t %s
> -
> +// REQUIRES: x86-registered-target
> @interface Foo
> {
> __attribute__((iboutlet)) id myoutlet;
>
> Modified: cfe/trunk/test/Index/c-index-getCursor-test.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/c-index-getCursor-test.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Index/c-index-getCursor-test.m (original)
> +++ cfe/trunk/test/Index/c-index-getCursor-test.m Tue Jul 7 15:11:29 2015
> @@ -166,3 +166,4 @@ void f() {
> // CHECK: [57:1 - 57:10] FunctionDecl=f:57:6 (Definition)
> // CHECK: [58:4 - 58:8] VarDecl=my_var:58:8 (Definition)
> // CHECK: [58:8 - 58:15] macro expansion=CONCAT:55:9
> +// REQUIRES: x86-registered-target
>
> Modified: cfe/trunk/test/Index/pch-with-module.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/pch-with-module.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Index/pch-with-module.m (original)
> +++ cfe/trunk/test/Index/pch-with-module.m Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t.cache
> // RUN: c-index-test -write-pch %t.h.pch %s -target
> x86_64-apple-macosx10.7 -fobjc-arc -fmodules-cache-path=%t.cache -fmodules
> -F %S/../Modules/Inputs -Xclang -fdisable-module-hash
> // RUN: %clang -fsyntax-only %s -target x86_64-apple-macosx10.7 -include
> %t.h -fobjc-arc -fmodules-cache-path=%t.cache -fmodules -F
> %S/../Modules/Inputs \
>
> Modified: cfe/trunk/test/Index/print-mangled-name.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/print-mangled-name.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Index/print-mangled-name.cpp (original)
> +++ cfe/trunk/test/Index/print-mangled-name.cpp Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-pch %s -o %t_linux.ast
> // RUN: c-index-test -test-print-mangle %t_linux.ast | FileCheck %s
> --check-prefix=ITANIUM
>
>
> Modified: cfe/trunk/test/Modules/compiler_builtins_arm.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/compiler_builtins_arm.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/compiler_builtins_arm.m (original)
> +++ cfe/trunk/test/Modules/compiler_builtins_arm.m Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,5 @@
> // RUN: rm -rf %t
> // RUN: %clang_cc1 -fsyntax-only -triple thumbv7-none-linux-gnueabihf
> -target-abi aapcs -target-cpu cortex-a8 -mfloat-abi hard -std=c99 -fmodules
> -fimplicit-module-maps -fmodules-cache-path=%t -D__need_wint_t %s -verify
> // expected-no-diagnostics
> -
> +// REQUIRES: arm-registered-target
> @import _Builtin_intrinsics.arm.neon;
>
> Modified: cfe/trunk/test/Modules/dependency-gen-inferred-map.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/dependency-gen-inferred-map.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/dependency-gen-inferred-map.m (original)
> +++ cfe/trunk/test/Modules/dependency-gen-inferred-map.m Tue Jul 7
> 15:11:29 2015
> @@ -1,5 +1,6 @@
> // Test that the virtual file "__inferred_module.map" doesn't show up as
> dependency.
>
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t-mcp
> // RUN: %clang_cc1 -isysroot %S/Inputs/System -triple
> x86_64-apple-darwin10 -dependency-file %t.d -MT %s.o -F %S/Inputs
> -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-mcp
> %s
> // RUN: FileCheck %s < %t.d
>
> Modified: cfe/trunk/test/Modules/dependency-gen-pch.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/dependency-gen-pch.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/dependency-gen-pch.m (original)
> +++ cfe/trunk/test/Modules/dependency-gen-pch.m Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,6 @@
> // RUN: rm -rf %t-mcp
> // RUN: mkdir -p %t-mcp
> +// REQUIRES: x86-registered-target
>
> // RUN: %clang_cc1 -isysroot %S/Inputs/System -triple
> x86_64-apple-darwin10 -module-file-deps -dependency-file %t.d -MT %s.o -I
> %S/Inputs -fmodules -fimplicit-module-maps -fdisable-module-hash
> -fmodules-cache-path=%t-mcp -emit-pch -o %t.pch %s
> // RUN: FileCheck %s < %t.d
>
> Modified: cfe/trunk/test/Modules/irgen.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/irgen.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/irgen.c (original)
> +++ cfe/trunk/test/Modules/irgen.c Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t
> // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c
> -fmodules-cache-path=%t -emit-module -fmodule-name=irgen -triple
> x86_64-apple-darwin10 %S/Inputs/module.map
> // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c
> -fmodules-cache-path=%t -I %S/Inputs -triple x86_64-apple-darwin10
> -emit-llvm -o - %s | FileCheck %s
>
> Added: cfe/trunk/test/Modules/pch_container.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/pch_container.m?rev=241620&view=auto
>
> ==============================================================================
> --- cfe/trunk/test/Modules/pch_container.m (added)
> +++ cfe/trunk/test/Modules/pch_container.m Tue Jul 7 15:11:29 2015
> @@ -0,0 +1,17 @@
> + at import DependsOnModule;
> +// REQUIRES: x86-registered-target
> +// RUN: rm -rf %t-MachO %t-ELF %t-ELF_SPLIT %t-COFF
> +// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fmodules
> -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t-MachO
> -F %S/Inputs %s
> +// RUN: %clang_cc1 -triple=x86_64-linux-elf -fmodules
> -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t-ELF -F
> %S/Inputs %s
> +// RUN: %clang_cc1 -triple=x86_64-windows-coff -fmodules
> -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t-COFF
> -F %S/Inputs %s
> +
> +// RUN: llvm-objdump -section-headers %t-MachO/DependsOnModule.pcm
> %t-ELF/DependsOnModule.pcm %t-COFF/DependsOnModule.pcm | FileCheck %s
> +// CHECK: file format Mach-O 64-bit x86-64
> +// CHECK: __clangast {{[0-9a-f]+}} {{[0-9a-f]+}} DATA
> +// CHECK: file format ELF64-x86-64
> +// CHECK: __clangast {{[0-9a-f]+}} {{[0-9a-f]+}} DATA
> +// CHECK: file format COFF-x86-64
> +// CHECK: clangast {{[0-9a-f]+}} {{[0-9a-f]+}}
> +
> +
> +// RUN: %clang_cc1 -split-dwarf-file t-split.dwo -triple=x86_64-linux-elf
> -fmodules -fimplicit-module-maps -fdisable-module-hash
> -fmodules-cache-path=%t-ELF_SPLIT -F %S/Inputs %s -o %t-split.o
>
> Modified: cfe/trunk/test/Modules/self-import-header.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/self-import-header.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/self-import-header.m (original)
> +++ cfe/trunk/test/Modules/self-import-header.m Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,5 @@
> // rdar://13840148
> -
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t
> // RUN: %clang -fsyntax-only -isysroot %S/Inputs/System/usr/include
> -fmodules -fmodules-cache-path=%t \
> // RUN: -target x86_64-darwin \
>
> Modified: cfe/trunk/test/Modules/templates-2.mm
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/templates-2.mm?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/templates-2.mm (original)
> +++ cfe/trunk/test/Modules/templates-2.mm Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++
> -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs
> -verify %s -Wno-objc-root-class
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++
> -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs
> -emit-llvm %s -o - -Wno-objc-root-class | FileCheck %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> @import templates_top;
>
> struct TestEmitDefaultedSpecialMembers {
>
> Modified: cfe/trunk/test/Modules/templates.mm
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/templates.mm?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/templates.mm (original)
> +++ cfe/trunk/test/Modules/templates.mm Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++
> -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs
> -verify %s -Wno-objc-root-class
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++
> -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs
> -emit-llvm %s -o - -Wno-objc-root-class | FileCheck %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> @import templates_left;
>
> void testInlineRedeclEarly() {
>
> Modified: cfe/trunk/test/Modules/va_list.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/va_list.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Modules/va_list.m (original)
> +++ cfe/trunk/test/Modules/va_list.m Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: rm -rf %t
> // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules
> -fimplicit-module-maps -fmodules-cache-path=%t \
> // RUN: -fmodules-ignore-macro=PREFIX -DPREFIX -I %S/Inputs/va_list \
>
> Modified: cfe/trunk/test/OpenMP/atomic_read_codegen.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/atomic_read_codegen.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/atomic_read_codegen.c (original)
> +++ cfe/trunk/test/OpenMP/atomic_read_codegen.c Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -emit-pch
> -o %t %s
> // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10
> -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/OpenMP/barrier_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/barrier_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/barrier_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/barrier_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple
> x86_64-unknown-unknown -emit-pch -o %t %s
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/OpenMP/critical_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/critical_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/critical_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/critical_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -3,7 +3,7 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s
> -emit-llvm -o - | FileCheck %s
> // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp
> -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o -
> | FileCheck %s --check-prefix=TERM_DEBUG
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/OpenMP/flush_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/flush_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/flush_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/flush_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple
> x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s
> -emit-llvm -o - | FileCheck %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/OpenMP/for_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/for_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/for_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -4,9 +4,9 @@
> // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp
> -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o -
> | FileCheck %s --check-prefix=TERM_DEBUG
> //
> // expected-no-diagnostics
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
> -
> // CHECK: [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* }
> // CHECK-DAG: [[IMPLICIT_BARRIER_LOC:@.+]] = private unnamed_addr
> constant %{{.+}} { i32 0, i32 66, i32 0, i32 0, i8*
> // CHECK-DAG: [[I:@.+]] = global i8 1,
>
> Modified: cfe/trunk/test/OpenMP/master_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/master_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/master_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/master_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -3,7 +3,7 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s
> -emit-llvm -o - | FileCheck %s
> // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp
> -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o -
> | FileCheck %s --check-prefix=TERM_DEBUG
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/parallel_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/parallel_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -2,9 +2,9 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple
> x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s
> -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEBUG %s
> // expected-no-diagnostics
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
> -
> // CHECK-DAG: %ident_t = type { i32, i32, i32, i32, i8* }
> // CHECK-DAG: %struct.anon = type { i32* }
> // CHECK-DAG: %struct.anon.0 = type { i8*** }
>
> Modified: cfe/trunk/test/OpenMP/parallel_private_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_private_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/parallel_private_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/parallel_private_codegen.cpp Tue Jul 7 15:11:29
> 2015
> @@ -4,9 +4,9 @@
> // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLAMBDA -triple
> %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=LAMBDA %s
> // RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple
> %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=BLOCKS %s
> // expected-no-diagnostics
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
> -
> template <class T>
> struct S {
> T f;
>
> Modified: cfe/trunk/test/OpenMP/simd_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/simd_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/simd_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple
> x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s
> -emit-llvm -o - | FileCheck %s
> // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp
> -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o -
> | FileCheck %s --check-prefix=TERM_DEBUG
> -//
> +// REQUIRES: x86-registered-target
> // expected-no-diagnostics
> #ifndef HEADER
> #define HEADER
>
> Modified: cfe/trunk/test/OpenMP/single_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/single_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/single_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/single_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -4,7 +4,7 @@
> // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp
> -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o -
> | FileCheck %s --check-prefix=TERM_DEBUG
> // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DARRAY -triple
> x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=ARRAY %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef ARRAY
> #ifndef HEADER
> #define HEADER
>
> Modified: cfe/trunk/test/OpenMP/taskyield_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskyield_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/taskyield_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/taskyield_codegen.cpp Tue Jul 7 15:11:29 2015
> @@ -2,7 +2,7 @@
> // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple
> x86_64-unknown-unknown -emit-pch -o %t %s
> // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown
> -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
> // expected-no-diagnostics
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER
> #define HEADER
>
>
> Modified: cfe/trunk/test/OpenMP/threadprivate_codegen.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/threadprivate_codegen.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/OpenMP/threadprivate_codegen.cpp (original)
> +++ cfe/trunk/test/OpenMP/threadprivate_codegen.cpp Tue Jul 7 15:11:29
> 2015
> @@ -18,7 +18,7 @@
> // CHECK-DEBUG-DAG: [[S4:%.+]] = type { [[INT]], [[INT]] }
> // CHECK-DEBUG-DAG: [[S5:%.+]] = type { [[INT]], [[INT]], [[INT]] }
> // CHECK-DEBUG-DAG: [[SMAIN:%.+]] = type { [[INT]], double, double }
> -
> +// REQUIRES: x86-registered-target
> struct S1 {
> int a;
> S1()
>
> Modified: cfe/trunk/test/PCH/__va_list_tag.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/__va_list_tag.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/__va_list_tag.c (original)
> +++ cfe/trunk/test/PCH/__va_list_tag.c Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // PR13189
> // rdar://problem/11741429
> // Test this without pch.
>
> Modified: cfe/trunk/test/PCH/arc.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/arc.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/arc.m (original)
> +++ cfe/trunk/test/PCH/arc.m Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // Test this without pch.
> // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc
> -include %S/Inputs/arc.h -fsyntax-only -emit-llvm-only %s
>
>
> Modified: cfe/trunk/test/PCH/asm.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/asm.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/asm.c (original)
> +++ cfe/trunk/test/PCH/asm.c Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // Test this without pch.
> // RUN: %clang_cc1 -triple i386-unknown-unknown -include %S/asm.h
> -fsyntax-only -verify %s
>
>
> Modified: cfe/trunk/test/PCH/chain-external-defs.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-external-defs.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/chain-external-defs.c (original)
> +++ cfe/trunk/test/PCH/chain-external-defs.c Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // Test with pch.
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t1.pch
> %S/Inputs/chain-external-defs1.h
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t2.pch
> %S/Inputs/chain-external-defs2.h -include-pch %t1.pch
>
> Modified: cfe/trunk/test/PCH/chain-trivial.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-trivial.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/chain-trivial.c (original)
> +++ cfe/trunk/test/PCH/chain-trivial.c Tue Jul 7 15:11:29 2015
> @@ -1,2 +1,3 @@
> +// REQUIRES: x86-registered-target
> // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t1
> %S/Inputs/chain-trivial1.h
> // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t2
> -include-pch %t1 %S/Inputs/chain-trivial2.h
>
> Modified: cfe/trunk/test/PCH/cxx-ms-function-specialization-class-scope.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cxx-ms-function-specialization-class-scope.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/cxx-ms-function-specialization-class-scope.cpp
> (original)
> +++ cfe/trunk/test/PCH/cxx-ms-function-specialization-class-scope.cpp Tue
> Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // RUN: %clang_cc1 -fms-extensions -triple i386-unknown-unknown -x
> c++-header -emit-pch -o %t %S/cxx-ms-function-specialization-class-scope.h
> // RUN: %clang_cc1 -fms-extensions -triple i386-unknown-unknown
> -include-pch %t -fsyntax-only -verify %s
> // expected-no-diagnostics
>
> Modified: cfe/trunk/test/PCH/external-defs.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/external-defs.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/external-defs.c (original)
> +++ cfe/trunk/test/PCH/external-defs.c Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // Test with pch.
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t.pch
> %S/external-defs.h
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t.pch
> -emit-llvm -o %t %s
>
> Modified: cfe/trunk/test/PCH/floating-literal.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/floating-literal.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/floating-literal.c (original)
> +++ cfe/trunk/test/PCH/floating-literal.c Tue Jul 7 15:11:29 2015
> @@ -1,4 +1,5 @@
> // RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-pch -o %t %s
> +// REQUIRES: mips-registered-target
> // RUN: %clang_cc1 -x ast -ast-print %t | FileCheck %s
>
> // Make sure the semantics of FloatingLiterals are stored correctly in
>
> Modified: cfe/trunk/test/PCH/local_static.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/local_static.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/local_static.cpp (original)
> +++ cfe/trunk/test/PCH/local_static.cpp Tue Jul 7 15:11:29 2015
> @@ -1,3 +1,4 @@
> +// REQUIRES: x86-registered-target
> // Test this without PCH.
> // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include
> %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s
> // RUN: FileCheck --input-file %t.no_pch.ll %s
>
> Modified: cfe/trunk/test/PCH/pchpch.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/pchpch.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/pchpch.c (original)
> +++ cfe/trunk/test/PCH/pchpch.c Tue Jul 7 15:11:29 2015
> @@ -1,6 +1,7 @@
> // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pch -o %t1
> %S/pchpch1.h
> // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pch -o %t2
> %S/pchpch2.h -include-pch %t1
> // RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only %s
> -include-pch %t2
> +// REQUIRES: x86-registered-target
>
> // The purpose of this test is to make sure that a PCH created while
> including
> // an existing PCH can be loaded.
>
> Modified: cfe/trunk/test/PCH/reloc.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/reloc.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/reloc.c (original)
> +++ cfe/trunk/test/PCH/reloc.c Tue Jul 7 15:11:29 2015
> @@ -3,6 +3,7 @@
> // RUN: %clang -target x86_64-apple-darwin10 -fsyntax-only \
> // RUN: -include-pch %t -isysroot %S/libroot %s -Xclang -verify
> // RUN: not %clang -target x86_64-apple-darwin10 -include-pch %t %s
> +// REQUIRES: x86-registered-target
>
> #include <reloc.h>
>
>
> Modified: cfe/trunk/test/PCH/subscripting-literals.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/subscripting-literals.m?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/subscripting-literals.m (original)
> +++ cfe/trunk/test/PCH/subscripting-literals.m Tue Jul 7 15:11:29 2015
> @@ -1,6 +1,7 @@
> // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o %t.nopch.ll
> %s
> // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-pch -o %t.pch %s
> // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o %t.pch.ll %s
> -include-pch %t.pch
> +// REQUIRES: x86-registered-target
> // RUN: diff %t.nopch.ll %t.pch.ll
>
> #ifndef HEADER
>
> Modified: cfe/trunk/test/PCH/target-options.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/target-options.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/target-options.c (original)
> +++ cfe/trunk/test/PCH/target-options.c Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,6 @@
> // RUN: %clang_cc1 -triple=x86_64-apple-darwin9 -emit-pch -o %t.pch
> %S/target-options.h
> // RUN: not %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include-pch
> %t.pch %s -emit-llvm -o - > %t.err 2>&1
> // RUN: FileCheck %s < %t.err
> +// REQUIRES: x86-registered-target
>
> // CHECK: for the target
>
> Modified: cfe/trunk/test/PCH/tentative-defs.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/tentative-defs.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/tentative-defs.c (original)
> +++ cfe/trunk/test/PCH/tentative-defs.c Tue Jul 7 15:11:29 2015
> @@ -1,6 +1,7 @@
> // Test with pch.
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t.pch
> %S/tentative-defs.h
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t.pch
> -verify -emit-llvm -o %t %s
> +// REQUIRES: x86-registered-target
>
> // RUN: grep "@variable = common global i32 0" %t | count 1
> // RUN: grep "@incomplete_array = common global .*1 x i32" %t | count 1
>
> Modified: cfe/trunk/test/PCH/thread-local.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/thread-local.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/thread-local.cpp (original)
> +++ cfe/trunk/test/PCH/thread-local.cpp Tue Jul 7 15:11:29 2015
> @@ -1,6 +1,6 @@
> // RUN: %clang_cc1 -pedantic-errors -std=c++11 -triple x86_64-linux-gnu
> -emit-pch %s -o %t
> // RUN: %clang_cc1 -pedantic-errors -std=c++11 -triple x86_64-linux-gnu
> -include-pch %t -verify %s
> -
> +// REQUIRES: x86-registered-target
> #ifndef HEADER_INCLUDED
>
> #define HEADER_INCLUDED
>
> Modified: cfe/trunk/test/PCH/va_arg.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/va_arg.c?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/va_arg.c (original)
> +++ cfe/trunk/test/PCH/va_arg.c Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,6 @@
> // Test this without pch.
> // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h
> %s -emit-llvm -o -
> +// REQUIRES: x86-registered-target
>
> // Test with pch.
> // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t
> %S/va_arg.h
>
> Modified: cfe/trunk/test/PCH/va_arg.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/va_arg.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/PCH/va_arg.cpp (original)
> +++ cfe/trunk/test/PCH/va_arg.cpp Tue Jul 7 15:11:29 2015
> @@ -1,5 +1,6 @@
> // Test this without pch.
> // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include
> %S/Inputs/va_arg.h %s -emit-llvm -o -
> +// REQUIRES: x86-registered-target
>
> // Test with pch.
> // RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -emit-pch -x
> c++-header -o %t %S/Inputs/va_arg.h
>
> Modified: cfe/trunk/tools/clang-check/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/CMakeLists.txt?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/clang-check/CMakeLists.txt (original)
> +++ cfe/trunk/tools/clang-check/CMakeLists.txt Tue Jul 7 15:11:29 2015
> @@ -1,4 +1,5 @@
> set(LLVM_LINK_COMPONENTS
> + ${LLVM_TARGETS_TO_BUILD}
> Option
> Support
> )
> @@ -11,6 +12,7 @@ target_link_libraries(clang-check
> clangAST
> clangBasic
> clangDriver
> + clangCodeGen
> clangFrontend
> clangRewriteFrontend
> clangStaticAnalyzerFrontend
>
> Modified: cfe/trunk/tools/clang-check/ClangCheck.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/ClangCheck.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/clang-check/ClangCheck.cpp (original)
> +++ cfe/trunk/tools/clang-check/ClangCheck.cpp Tue Jul 7 15:11:29 2015
> @@ -17,6 +17,7 @@
>
> //===----------------------------------------------------------------------===//
>
> #include "clang/AST/ASTConsumer.h"
> +#include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
> #include "clang/Driver/Options.h"
> #include "clang/Frontend/ASTConsumers.h"
> #include "clang/Frontend/CompilerInstance.h"
> @@ -151,7 +152,8 @@ int main(int argc, const char **argv) {
> llvm::sys::PrintStackTraceOnErrorSignal();
> CommonOptionsParser OptionsParser(argc, argv, ClangCheckCategory);
> ClangTool Tool(OptionsParser.getCompilations(),
> - OptionsParser.getSourcePathList());
> + OptionsParser.getSourcePathList(),
> +
> std::make_shared<clang::ObjectFilePCHContainerOperations>());
>
> // Clear adjusters because -fsyntax-only is inserted by the default
> chain.
> Tool.clearArgumentsAdjusters();
>
> Modified: cfe/trunk/tools/clang-check/Makefile
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/Makefile?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/clang-check/Makefile (original)
> +++ cfe/trunk/tools/clang-check/Makefile Tue Jul 7 15:11:29 2015
> @@ -15,11 +15,14 @@ TOOLNAME = clang-check
> TOOL_NO_EXPORTS = 1
>
> include $(CLANG_LEVEL)/../../Makefile.config
> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc
> option
> -USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a \
> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo
> objcarcopts \
> + instrumentation bitwriter support mc option
> +USEDLIBS = clangFrontend.a clangCodeGen.a clangIndex.a \
> + clangSerialization.a clangDriver.a \
> clangTooling.a clangParse.a clangSema.a \
> clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
> clangStaticAnalyzerCore.a clangAnalysis.a
> clangRewriteFrontend.a \
> - clangRewrite.a clangEdit.a clangAST.a clangLex.a clangBasic.a
> + clangRewrite.a clangEdit.a clangAST.a clangLex.a \
> + clangBasic.a
>
> include $(CLANG_LEVEL)/Makefile
>
> Modified: cfe/trunk/tools/driver/cc1_main.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/driver/cc1_main.cpp (original)
> +++ cfe/trunk/tools/driver/cc1_main.cpp Tue Jul 7 15:11:29 2015
> @@ -14,7 +14,7 @@
>
> //===----------------------------------------------------------------------===//
>
> #include "llvm/Option/Arg.h"
> -#include "clang/Frontend/PCHContainerOperations.h"
> +#include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
> #include "clang/Driver/DriverDiagnostic.h"
> #include "clang/Driver/Options.h"
> #include "clang/Frontend/CompilerInstance.h"
> @@ -65,8 +65,8 @@ void initializePollyPasses(llvm::PassReg
> #endif
>
> int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void
> *MainAddr) {
> - std::unique_ptr<CompilerInstance> Clang(
> - new
> CompilerInstance(std::make_shared<RawPCHContainerOperations>()));
> + std::unique_ptr<CompilerInstance> Clang(new CompilerInstance(
> + std::make_shared<ObjectFilePCHContainerOperations>()));
> IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
>
> // Initialize targets first, so that --version shows registered targets.
>
> Modified: cfe/trunk/tools/libclang/CIndex.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/libclang/CIndex.cpp (original)
> +++ cfe/trunk/tools/libclang/CIndex.cpp Tue Jul 7 15:11:29 2015
> @@ -29,6 +29,7 @@
> #include "clang/Basic/DiagnosticIDs.h"
> #include "clang/Basic/TargetInfo.h"
> #include "clang/Basic/Version.h"
> +#include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
> #include "clang/Frontend/ASTUnit.h"
> #include "clang/Frontend/CompilerInstance.h"
> #include "clang/Frontend/FrontendDiagnostic.h"
> @@ -2876,7 +2877,8 @@ CXIndex clang_createIndex(int excludeDec
> // registered once.
> (void)*RegisterFatalErrorHandlerOnce;
>
> - CIndexer *CIdxr = new CIndexer();
> + CIndexer *CIdxr =
> + new CIndexer(std::make_shared<ObjectFilePCHContainerOperations>());
> if (excludeDeclarationsFromPCH)
> CIdxr->setOnlyLocalDecls();
> if (displayDiagnostics)
>
> Modified: cfe/trunk/tools/libclang/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/libclang/CMakeLists.txt (original)
> +++ cfe/trunk/tools/libclang/CMakeLists.txt Tue Jul 7 15:11:29 2015
> @@ -37,9 +37,14 @@ set(SOURCES
> ../../include/clang-c/Index.h
> )
>
> +set( LLVM_LINK_COMPONENTS
> + ${LLVM_TARGETS_TO_BUILD}
> + )
> +
> set(LIBS
> clangAST
> clangBasic
> + clangCodeGen
> clangFrontend
> clangIndex
> clangLex
>
> Modified: cfe/trunk/tools/libclang/Makefile
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Makefile?rev=241620&r1=241619&r2=241620&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/libclang/Makefile (original)
> +++ cfe/trunk/tools/libclang/Makefile Tue Jul 7 15:11:29 2015
> @@ -16,19 +16,21 @@ LINK_LIBS_IN_SHARED = 1
> SHARED_LIBRARY = 1
>
> include $(CLANG_LEVEL)/../../Makefile.config
> -LINK_COMPONENTS := AsmParser BitReader Core MC MCParser Option Support
> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter core
> \
> + instrumentation ipo mc mcparser objcarcopts option
> support \
> + object
> USEDLIBS = clangIndex.a clangARCMigrate.a \
> clangRewriteFrontend.a \
> clangFormat.a \
> clangTooling.a clangToolingCore.a \
> - clangFrontend.a clangDriver.a \
> + clangFrontend.a clangCodeGen.a clangDriver.a \
> clangSerialization.a \
> clangParse.a clangSema.a \
> clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
> clangRewrite.a \
> clangAnalysis.a clangEdit.a \
> clangASTMatchers.a \
> - clangAST.a clangLex.a clangBasic.a \
> + clangAST.a clangLex.a clangBasic.a
>
> include $(CLANG_LEVEL)/Makefile
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150713/e1046ff1/attachment.html>
More information about the cfe-commits
mailing list