r230423 - Wrap clang module files in a Mach-O, ELF, or COFF container.

Adrian Prantl aprantl at apple.com
Tue Feb 24 18:28:45 PST 2015


You are correct. I need to remove the use of PCHGenerator from ModuleContainerGenerator.

thanks for noticing!
-- adrian
> On Feb 24, 2015, at 6:11 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> 
> It still has circular dependencies between clangCodeGen and clangFrontend.
> 
> 2015-02-25 10:31 GMT+09:00 Adrian Prantl <aprantl at apple.com>:
>> Author: adrian
>> Date: Tue Feb 24 19:31:45 2015
>> New Revision: 230423
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=230423&view=rev
>> Log:
>> Wrap clang module files in a Mach-O, ELF, or COFF container.
>> This is a necessary prerequisite for debugging with modules.
>> The .pcm files become containers that hold the serialized AST which allows
>> us to store debug information in the module file that can be shared by all
>> object files that were built importing the module.
>> 
>> This reapplies r230044 with a fixed configure+make build and updated
>> dependencies and testcase requirements. Over the last iteration this
>> version adds
>> - missing target requirements for testcases that specify an x86 triple,
>> - a missing clangCodeGen.a dependency to libClang.a in the make build.
>> 
>> rdar://problem/19104245
>> 
>> Added:
>>    cfe/trunk/include/clang/CodeGen/CodeGenModuleContainer.h
>>    cfe/trunk/lib/CodeGen/CodeGenModuleContainer.cpp
>>    cfe/trunk/test/Modules/module_container.m
>> Modified:
>>    cfe/trunk/docs/PCHInternals.rst
>>    cfe/trunk/include/clang/Frontend/FrontendActions.h
>>    cfe/trunk/include/clang/Serialization/ASTReader.h
>>    cfe/trunk/include/clang/Serialization/ASTWriter.h
>>    cfe/trunk/lib/CodeGen/CMakeLists.txt
>>    cfe/trunk/lib/Frontend/ASTUnit.cpp
>>    cfe/trunk/lib/Frontend/CMakeLists.txt
>>    cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp
>>    cfe/trunk/lib/Frontend/FrontendActions.cpp
>>    cfe/trunk/lib/Frontend/MultiplexConsumer.cpp
>>    cfe/trunk/lib/Serialization/ASTReader.cpp
>>    cfe/trunk/lib/Serialization/CMakeLists.txt
>>    cfe/trunk/lib/Serialization/GeneratePCH.cpp
>>    cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
>>    cfe/trunk/lib/Serialization/ModuleManager.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/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/arcmt-test/Makefile
>>    cfe/trunk/tools/c-arcmt-test/Makefile
>>    cfe/trunk/tools/c-index-test/Makefile
>>    cfe/trunk/tools/clang-check/Makefile
>>    cfe/trunk/tools/diagtool/Makefile
>>    cfe/trunk/tools/libclang/CMakeLists.txt
>>    cfe/trunk/tools/libclang/Makefile
>>    cfe/trunk/unittests/AST/Makefile
>>    cfe/trunk/unittests/ASTMatchers/Dynamic/Makefile
>>    cfe/trunk/unittests/ASTMatchers/Makefile
>>    cfe/trunk/unittests/CodeGen/Makefile
>>    cfe/trunk/unittests/Frontend/Makefile
>>    cfe/trunk/unittests/Sema/Makefile
>>    cfe/trunk/unittests/Tooling/Makefile
>>    cfe/trunk/unittests/libclang/Makefile
>> 
>> Modified: cfe/trunk/docs/PCHInternals.rst
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/PCHInternals.rst?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/docs/PCHInternals.rst (original)
>> +++ cfe/trunk/docs/PCHInternals.rst Tue Feb 24 19:31:45 2015
>> @@ -65,6 +65,9 @@ be included at the beginning of the tran
>> AST file format required for modules are discussed in the section on
>> :ref:`modules <pchinternals-modules>`.
>> 
>> +Clang's AST files are Mach-O, ELF, or COFF containers that contain a
>> +``__clangast`` section which holds the AST bitstream.
>> +
>> Clang's AST files are designed with a compact on-disk representation, which
>> minimizes both creation time and the time required to initially load the AST
>> file.  The AST file itself contains a serialized representation of Clang's
>> 
>> Added: cfe/trunk/include/clang/CodeGen/CodeGenModuleContainer.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/CodeGenModuleContainer.h?rev=230423&view=auto
>> ==============================================================================
>> --- cfe/trunk/include/clang/CodeGen/CodeGenModuleContainer.h (added)
>> +++ cfe/trunk/include/clang/CodeGen/CodeGenModuleContainer.h Tue Feb 24 19:31:45 2015
>> @@ -0,0 +1,34 @@
>> +//===--- CodeGen/ModuleContainerGenerator.h - Emit .pcm files ---*- 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_MODULE_CONTAINER_H
>> +#define LLVM_CLANG_CODEGEN_MODULE_CONTAINER_H
>> +
>> +#include "ModuleBuilder.h"
>> +#include <string>
>> +
>> +namespace llvm {
>> +class raw_ostream;
>> +}
>> +
>> +namespace clang {
>> +
>> +class PCHGenerator;
>> +class TargetOptions;
>> +
>> +/// \brief Create a CodeGenerator instance.
>> +/// It is the responsibility of the caller to call delete on
>> +/// the allocated CodeGenerator instance.
>> +CodeGenerator *CreateModuleContainerGenerator(
>> +    DiagnosticsEngine &Diags, const std::string &ModuleName,
>> +    const CodeGenOptions &CGO, const TargetOptions &TO, const LangOptions &LO,
>> +    llvm::raw_ostream *OS, PCHGenerator *PCHGen);
>> +}
>> +
>> +#endif
>> 
>> Modified: cfe/trunk/include/clang/Frontend/FrontendActions.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendActions.h?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Frontend/FrontendActions.h (original)
>> +++ cfe/trunk/include/clang/Frontend/FrontendActions.h Tue Feb 24 19:31:45 2015
>> @@ -69,6 +69,14 @@ protected:
>>                                                  StringRef InFile) override;
>> };
>> 
>> +/// \brief Emits the output of a GeneratePCHAction or GenerateModuleAction into
>> +/// a Mach-O/ELF/COFF container.
>> +class GeneratePCMContainerAction : public FrontendAction {
>> +protected:
>> +  std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
>> +                                                 StringRef InFile) override;
>> +};
>> +
>> class GeneratePCHAction : public ASTFrontendAction {
>> protected:
>>   std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
>> 
>> Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
>> +++ cfe/trunk/include/clang/Serialization/ASTReader.h Tue Feb 24 19:31:45 2015
>> @@ -1127,6 +1127,10 @@ private:
>> public:
>>   void ResolveImportedPath(ModuleFile &M, std::string &Filename);
>>   static void ResolveImportedPath(std::string &Filename, StringRef Prefix);
>> +  /// \brief Initialize a BitstreamReader with the `__clangast` section from an
>> +  /// object file container found in Buffer.
>> +  static void InitStreamFileWithModule(llvm::MemoryBufferRef Buffer,
>> +                                       llvm::BitstreamReader &StreamFile);
>> 
>> private:
>>   struct ImportedModule {
>> 
>> Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTWriter.h?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Serialization/ASTWriter.h (original)
>> +++ cfe/trunk/include/clang/Serialization/ASTWriter.h Tue Feb 24 19:31:45 2015
>> @@ -823,10 +823,13 @@ class PCHGenerator : public SemaConsumer
>>   std::string OutputFile;
>>   clang::Module *Module;
>>   std::string isysroot;
>> -  raw_ostream *Out;
>>   Sema *SemaPtr;
>> -  SmallVector<char, 128> Buffer;
>> +  // This buffer is always large, but BitstreamWriter really wants a
>> +  // SmallVectorImpl<char>.
>> +  SmallVector<char, 0> Buffer;
>>   llvm::BitstreamWriter Stream;
>> +  std::function<void(SmallVectorImpl<char>*)>
>> +    SerializationFinishedCallback;
>>   ASTWriter Writer;
>>   bool AllowASTWithErrors;
>>   bool HasEmittedPCH;
>> @@ -836,16 +839,21 @@ protected:
>>   const ASTWriter &getWriter() const { return Writer; }
>> 
>> public:
>> -  PCHGenerator(const Preprocessor &PP, StringRef OutputFile,
>> +  PCHGenerator(const Preprocessor &PP,
>> +               StringRef OutputFile,
>>                clang::Module *Module,
>> -               StringRef isysroot, raw_ostream *Out,
>> +               StringRef isysroot,
>>                bool AllowASTWithErrors = false);
>>   ~PCHGenerator();
>>   void InitializeSema(Sema &S) override { SemaPtr = &S; }
>>   void HandleTranslationUnit(ASTContext &Ctx) override;
>>   ASTMutationListener *GetASTMutationListener() override;
>>   ASTDeserializationListener *GetASTDeserializationListener() override;
>> -
>> +  /// \brief Register a callback to be invoked when the serialization is done.
>> +  void RegisterSerializationFinishedCallback(
>> +    const std::function<void(SmallVectorImpl<char>*)> Fn) {
>> +    SerializationFinishedCallback = Fn;
>> +  }
>>   bool hasEmittedPCH() const { return HasEmittedPCH; }
>> };
>> 
>> 
>> Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CMakeLists.txt?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CMakeLists.txt (original)
>> +++ cfe/trunk/lib/CodeGen/CMakeLists.txt Tue Feb 24 19:31:45 2015
>> @@ -1,4 +1,5 @@
>> set(LLVM_LINK_COMPONENTS
>> +  ${LLVM_TARGETS_TO_BUILD}
>>   Analysis
>>   BitReader
>>   BitWriter
>> @@ -63,6 +64,7 @@ add_clang_library(clangCodeGen
>>   CodeGenAction.cpp
>>   CodeGenFunction.cpp
>>   CodeGenModule.cpp
>> +  CodeGenModuleContainer.cpp
>>   CodeGenPGO.cpp
>>   CodeGenTBAA.cpp
>>   CodeGenTypes.cpp
>> 
>> Added: cfe/trunk/lib/CodeGen/CodeGenModuleContainer.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModuleContainer.cpp?rev=230423&view=auto
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CodeGenModuleContainer.cpp (added)
>> +++ cfe/trunk/lib/CodeGen/CodeGenModuleContainer.cpp Tue Feb 24 19:31:45 2015
>> @@ -0,0 +1,150 @@
>> +//===--- CodeGenModuleContainer.cpp - Emit .pcm files ---------------------===//
>> +//
>> +//                     The LLVM Compiler Infrastructure
>> +//
>> +// This file is distributed under the University of Illinois Open Source
>> +// License. See LICENSE.TXT for details.
>> +//
>> +//===----------------------------------------------------------------------===//
>> +
>> +#include "clang/CodeGen/CodeGenModuleContainer.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/IR/Constants.h"
>> +#include "llvm/IR/DataLayout.h"
>> +#include "llvm/IR/LLVMContext.h"
>> +#include "llvm/IR/Module.h"
>> +#include "llvm/Support/TargetRegistry.h"
>> +#include <memory>
>> +using namespace clang;
>> +
>> +namespace {
>> +class ModuleContainerGenerator : public CodeGenerator {
>> +  DiagnosticsEngine &Diags;
>> +  std::unique_ptr<const llvm::DataLayout> TD;
>> +  ASTContext *Ctx;
>> +  const CodeGenOptions CodeGenOpts;
>> +  const TargetOptions TargetOpts;
>> +  const LangOptions LangOpts;
>> +  llvm::LLVMContext VMContext;
>> +  std::unique_ptr<llvm::Module> M;
>> +  std::unique_ptr<CodeGen::CodeGenModule> Builder;
>> +  raw_ostream *OS;
>> +  SmallVectorImpl<char> *SerializedASTBuffer;
>> +
>> +public:
>> +  ModuleContainerGenerator(DiagnosticsEngine &diags,
>> +                           const std::string &ModuleName,
>> +                           const CodeGenOptions &CGO, const TargetOptions &TO,
>> +                           const LangOptions &LO, raw_ostream *OS,
>> +                           PCHGenerator *PCHGen)
>> +      : Diags(diags), CodeGenOpts(CGO), TargetOpts(TO), LangOpts(LO),
>> +        M(new llvm::Module(ModuleName, VMContext)), OS(OS) {
>> +    PCHGen->RegisterSerializationFinishedCallback(
>> +      [&](SmallVectorImpl<char> *Buf){
>> +        SerializedASTBuffer = Buf;
>> +      });
>> +  }
>> +
>> +  virtual ~ModuleContainerGenerator() {}
>> +  llvm::Module *GetModule() override { return M.get(); }
>> +  llvm::Module *ReleaseModule() override { return M.release(); }
>> +
>> +  /// Lifted from ModuleBuilder.
>> +  const Decl *GetDeclForMangledName(StringRef MangledName) override {
>> +    GlobalDecl Result;
>> +    if (!Builder->lookupRepresentativeDecl(MangledName, Result))
>> +      return nullptr;
>> +    const Decl *D = Result.getCanonicalDecl().getDecl();
>> +    if (auto FD = dyn_cast<FunctionDecl>(D)) {
>> +      if (FD->hasBody(FD))
>> +        return FD;
>> +    } else if (auto TD = dyn_cast<TagDecl>(D)) {
>> +      if (auto Def = TD->getDefinition())
>> +        return Def;
>> +    }
>> +    return D;
>> +  }
>> +
>> +  void Initialize(ASTContext &Context) override {
>> +    Ctx = &Context;
>> +    M->setTargetTriple(Ctx->getTargetInfo().getTriple().getTriple());
>> +    M->setDataLayout(Ctx->getTargetInfo().getTargetDescription());
>> +    TD.reset(new llvm::DataLayout(Ctx->getTargetInfo().getTargetDescription()));
>> +    Builder.reset(
>> +        new CodeGen::CodeGenModule(Context, CodeGenOpts, *M, *TD, Diags));
>> +  }
>> +
>> +  /// Emit a container holding the serialized AST.
>> +  void HandleTranslationUnit(ASTContext &Ctx) override {
>> +    if (Diags.hasErrorOccurred()) {
>> +      if (Builder)
>> +        Builder->clear();
>> +      M.reset();
>> +      return;
>> +    }
>> +
>> +    // 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.
>> +    auto Size = SerializedASTBuffer->size();
>> +    auto Int8Ty = llvm::Type::getInt8Ty(VMContext);
>> +    auto *Ty = llvm::ArrayType::get(Int8Ty, Size);
>> +    auto *Data = llvm::ConstantDataArray::getString(VMContext,
>> +        StringRef(SerializedASTBuffer->data(), Size), /*AddNull=*/false);
>> +    auto *ASTSym = new llvm::GlobalVariable(*M, Ty, /*constant*/ true,
>> +        llvm::GlobalVariable::InternalLinkage, Data, "__clang_ast");
>> +    ASTSym->setAlignment(8);
>> +    if (Triple.isOSBinFormatMachO())
>> +      // Include Mach-O segment name.
>> +      ASTSym->setSection("__CLANG,__clangast");
>> +    else if (Triple.isOSBinFormatCOFF())
>> +      // Adhere to COFF eight-character limit.
>> +      ASTSym->setSection("clangast");
>> +    else
>> +      ASTSym->setSection("__clangast");
>> +
>> +    // Use the LLVM backend to emit the pcm.
>> +    clang::EmitBackendOutput(Diags, CodeGenOpts, TargetOpts, LangOpts,
>> +                      Ctx.getTargetInfo().getTargetDescription(), M.get(),
>> +                      BackendAction::Backend_EmitObj, OS);
>> +
>> +    // Make sure the module container hits disk now.
>> +    OS->flush();
>> +
>> +    // Free up some memory, in case the process is kept alive.
>> +    SerializedASTBuffer->clear();
>> +  }
>> +};
>> +}
>> +
>> +CodeGenerator *clang::CreateModuleContainerGenerator(
>> +    DiagnosticsEngine &Diags, const std::string &ModuleName,
>> +    const CodeGenOptions &CGO, const TargetOptions &TO, const LangOptions &LO,
>> +    llvm::raw_ostream *OS, PCHGenerator *PCHGen) {
>> +  return
>> +    new ModuleContainerGenerator(Diags, ModuleName, CGO, TO, LO, OS, PCHGen);
>> +}
>> 
>> Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
>> +++ cfe/trunk/lib/Frontend/ASTUnit.cpp Tue Feb 24 19:31:45 2015
>> @@ -914,13 +914,20 @@ class PrecompilePreambleConsumer : publi
>>   unsigned &Hash;
>>   std::vector<Decl *> TopLevelDecls;
>>   PrecompilePreambleAction *Action;
>> +  raw_ostream *Out;
>> +  SmallVectorImpl<char> *SerializedASTBuffer;
>> 
>> public:
>>   PrecompilePreambleConsumer(ASTUnit &Unit, PrecompilePreambleAction *Action,
>>                              const Preprocessor &PP, StringRef isysroot,
>>                              raw_ostream *Out)
>> -    : PCHGenerator(PP, "", nullptr, isysroot, Out, /*AllowASTWithErrors=*/true),
>> -      Unit(Unit), Hash(Unit.getCurrentTopLevelHashValue()), Action(Action) {
>> +    : PCHGenerator(PP, "", nullptr, isysroot, /*AllowASTWithErrors=*/true),
>> +      Unit(Unit), Hash(Unit.getCurrentTopLevelHashValue()), Action(Action),
>> +      Out(Out) {
>> +    RegisterSerializationFinishedCallback(
>> +      [&](SmallVectorImpl<char> *Buf){
>> +        SerializedASTBuffer = Buf;
>> +      });
>>     Hash = 0;
>>   }
>> 
>> @@ -941,6 +948,13 @@ public:
>>   void HandleTranslationUnit(ASTContext &Ctx) override {
>>     PCHGenerator::HandleTranslationUnit(Ctx);
>>     if (hasEmittedPCH()) {
>> +      // Write the generated bitstream to "Out".
>> +      Out->write((char *)&SerializedASTBuffer->front(),
>> +                 SerializedASTBuffer->size());
>> +      // Make sure it hits disk now.
>> +      Out->flush();
>> +      SerializedASTBuffer->clear();
>> +
>>       // Translate the top-level declarations we captured during
>>       // parsing into declaration IDs in the precompiled
>>       // preamble. This will allow us to deserialize those top-level
>> 
>> Modified: cfe/trunk/lib/Frontend/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CMakeLists.txt?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/CMakeLists.txt (original)
>> +++ cfe/trunk/lib/Frontend/CMakeLists.txt Tue Feb 24 19:31:45 2015
>> @@ -45,6 +45,7 @@ add_clang_library(clangFrontend
>>   LINK_LIBS
>>   clangAST
>>   clangBasic
>> +  clangCodeGen
>>   clangDriver
>>   clangEdit
>>   clangLex
>> 
>> Modified: cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp (original)
>> +++ cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp Tue Feb 24 19:31:45 2015
>> @@ -156,11 +156,13 @@ IntrusiveRefCntPtr<ExternalSemaSource> c
>>                                                  &Clang->getPreprocessor());
>>     Clang->createASTContext();
>> 
>> -    SmallVector<char, 256> serialAST;
>> -    llvm::raw_svector_ostream OS(serialAST);
>> -    auto consumer =
>> -        llvm::make_unique<PCHGenerator>(Clang->getPreprocessor(), "-", nullptr,
>> -                                        /*isysroot=*/"", &OS);
>> +    auto consumer = llvm::make_unique<PCHGenerator>(Clang->getPreprocessor(),
>> +                                       "-", nullptr, /*isysroot=*/"");
>> +    SmallVectorImpl<char> *serialAST;
>> +    consumer->RegisterSerializationFinishedCallback(
>> +      [&](SmallVectorImpl<char> *Buf){
>> +        serialAST = Buf;
>> +      });
>>     Clang->getASTContext().setASTMutationListener(
>>                                             consumer->GetASTMutationListener());
>>     Clang->setASTConsumer(std::move(consumer));
>> @@ -197,7 +199,9 @@ IntrusiveRefCntPtr<ExternalSemaSource> c
>> 
>>     ParseAST(Clang->getSema());
>>     Clang->getDiagnosticClient().EndSourceFile();
>> -    SerialBufs.push_back(llvm::MemoryBuffer::getMemBufferCopy(OS.str()));
>> +    SerialBufs.push_back(llvm::MemoryBuffer::
>> +        getMemBufferCopy(StringRef(serialAST->data(), serialAST->size())));
>> +    serialAST->clear();
>>     source->CIs.push_back(Clang.release());
>>   }
>> 
>> 
>> Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
>> +++ cfe/trunk/lib/Frontend/FrontendActions.cpp Tue Feb 24 19:31:45 2015
>> @@ -10,10 +10,13 @@
>> #include "clang/Frontend/FrontendActions.h"
>> #include "clang/AST/ASTConsumer.h"
>> #include "clang/Basic/FileManager.h"
>> +#include "clang/Basic/TargetInfo.h"
>> +#include "clang/CodeGen/CodeGenModuleContainer.h"
>> #include "clang/Frontend/ASTConsumers.h"
>> #include "clang/Frontend/ASTUnit.h"
>> #include "clang/Frontend/CompilerInstance.h"
>> #include "clang/Frontend/FrontendDiagnostic.h"
>> +#include "clang/Frontend/MultiplexConsumer.h"
>> #include "clang/Frontend/Utils.h"
>> #include "clang/Lex/HeaderSearch.h"
>> #include "clang/Lex/Pragma.h"
>> @@ -85,8 +88,23 @@ GeneratePCHAction::CreateASTConsumer(Com
>> 
>>   if (!CI.getFrontendOpts().RelocatablePCH)
>>     Sysroot.clear();
>> -  return llvm::make_unique<PCHGenerator>(CI.getPreprocessor(), OutputFile,
>> -                                         nullptr, Sysroot, OS);
>> +
>> +  std::vector<std::unique_ptr<ASTConsumer>> Consumers;
>> +  Consumers.push_back(llvm::make_unique<PCHGenerator>(CI.getPreprocessor(),
>> +                                                      OutputFile, nullptr,
>> +                                                      Sysroot));
>> +
>> +  auto CGOpts = CI.getCodeGenOpts();
>> +  // The debug info emitted by ModuleContainerGenerator is not affected by the
>> +  // optimization level.
>> +  CGOpts.OptimizationLevel = 0;
>> +  CGOpts.setDebugInfo(CodeGenOptions::LimitedDebugInfo);
>> +  Consumers.push_back(std::unique_ptr<ASTConsumer>(
>> +      CreateModuleContainerGenerator(CI.getDiagnostics(), "PCH", CGOpts,
>> +                                     CI.getTargetOpts(), CI.getLangOpts(), OS,
>> +                                     cast<PCHGenerator>(Consumers[0].get()))));
>> +
>> +  return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
>> }
>> 
>> bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI,
>> @@ -122,8 +140,22 @@ GenerateModuleAction::CreateASTConsumer(
>>   if (ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, OS))
>>     return nullptr;
>> 
>> -  return llvm::make_unique<PCHGenerator>(CI.getPreprocessor(), OutputFile,
>> -                                         Module, Sysroot, OS);
>> +  std::vector<std::unique_ptr<ASTConsumer>> Consumers;
>> +  Consumers.push_back(llvm::make_unique<PCHGenerator>(CI.getPreprocessor(),
>> +                                                      OutputFile, Module,
>> +                                                      Sysroot));
>> +
>> +  auto CGOpts = CI.getCodeGenOpts();
>> +  // The debug info emitted by ModuleContainerGenerator is not affected by the
>> +  // optimization level.
>> +  CGOpts.OptimizationLevel = 0;
>> +  CGOpts.setDebugInfo(CodeGenOptions::LimitedDebugInfo);
>> +  Consumers.push_back(
>> +      std::unique_ptr<ASTConsumer>(CreateModuleContainerGenerator(
>> +          CI.getDiagnostics(), Module->getFullModuleName(), CGOpts,
>> +          CI.getTargetOpts(), CI.getLangOpts(), OS,
>> +          cast<PCHGenerator>(Consumers[0].get()))));
>> +  return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
>> }
>> 
>> static SmallVectorImpl<char> &
>> 
>> Modified: cfe/trunk/lib/Frontend/MultiplexConsumer.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/MultiplexConsumer.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/MultiplexConsumer.cpp (original)
>> +++ cfe/trunk/lib/Frontend/MultiplexConsumer.cpp Tue Feb 24 19:31:45 2015
>> @@ -33,11 +33,14 @@ public:
>>   void ReaderInitialized(ASTReader *Reader) override;
>>   void IdentifierRead(serialization::IdentID ID,
>>                       IdentifierInfo *II) override;
>> +  void MacroRead(serialization::MacroID ID, MacroInfo *MI) override;
>>   void TypeRead(serialization::TypeIdx Idx, QualType T) override;
>>   void DeclRead(serialization::DeclID ID, const Decl *D) override;
>>   void SelectorRead(serialization::SelectorID iD, Selector Sel) override;
>>   void MacroDefinitionRead(serialization::PreprocessedEntityID,
>>                            MacroDefinition *MD) override;
>> +  void ModuleRead(serialization::SubmoduleID ID, Module *Mod) override;
>> +
>> private:
>>   std::vector<ASTDeserializationListener*> Listeners;
>> };
>> @@ -59,6 +62,12 @@ void MultiplexASTDeserializationListener
>>     Listeners[i]->IdentifierRead(ID, II);
>> }
>> 
>> +void MultiplexASTDeserializationListener::MacroRead(
>> +    serialization::MacroID ID, MacroInfo *MI) {
>> +  for (auto &Listener : Listeners)
>> +    Listener->MacroRead(ID, MI);
>> +}
>> +
>> void MultiplexASTDeserializationListener::TypeRead(
>>     serialization::TypeIdx Idx, QualType T) {
>>   for (size_t i = 0, e = Listeners.size(); i != e; ++i)
>> @@ -83,6 +92,12 @@ void MultiplexASTDeserializationListener
>>     Listeners[i]->MacroDefinitionRead(ID, MD);
>> }
>> 
>> +void MultiplexASTDeserializationListener::ModuleRead(
>> +    serialization::SubmoduleID ID, Module *Mod) {
>> +  for (auto &Listener : Listeners)
>> +    Listener->ModuleRead(ID, Mod);
>> +}
>> +
>> // This ASTMutationListener forwards its notifications to a set of
>> // child listeners.
>> class MultiplexASTMutationListener : public ASTMutationListener {
>> @@ -98,11 +113,13 @@ public:
>>                                const VarTemplateSpecializationDecl *D) override;
>>   void AddedCXXTemplateSpecialization(const FunctionTemplateDecl *TD,
>>                                       const FunctionDecl *D) override;
>> +  void ResolvedExceptionSpec(const FunctionDecl *FD) override;
>>   void DeducedReturnType(const FunctionDecl *FD, QualType ReturnType) override;
>>   void CompletedImplicitDefinition(const FunctionDecl *D) override;
>>   void StaticDataMemberInstantiated(const VarDecl *D) override;
>>   void AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD,
>>                                     const ObjCInterfaceDecl *IFD) override;
>> +  void FunctionDefinitionInstantiated(const FunctionDecl *D) override;
>>   void AddedObjCPropertyInClassExtension(const ObjCPropertyDecl *Prop,
>>                                     const ObjCPropertyDecl *OrigProp,
>>                                     const ObjCCategoryDecl *ClassExt) override;
>> @@ -149,6 +166,11 @@ void MultiplexASTMutationListener::Added
>>   for (size_t i = 0, e = Listeners.size(); i != e; ++i)
>>     Listeners[i]->AddedCXXTemplateSpecialization(TD, D);
>> }
>> +void MultiplexASTMutationListener::ResolvedExceptionSpec(
>> +    const FunctionDecl *FD) {
>> +  for (auto &Listener : Listeners)
>> +    Listener->ResolvedExceptionSpec(FD);
>> +}
>> void MultiplexASTMutationListener::DeducedReturnType(const FunctionDecl *FD,
>>                                                      QualType ReturnType) {
>>   for (size_t i = 0, e = Listeners.size(); i != e; ++i)
>> @@ -170,6 +192,11 @@ void MultiplexASTMutationListener::Added
>>   for (size_t i = 0, e = Listeners.size(); i != e; ++i)
>>     Listeners[i]->AddedObjCCategoryToInterface(CatD, IFD);
>> }
>> +void MultiplexASTMutationListener::FunctionDefinitionInstantiated(
>> +    const FunctionDecl *D) {
>> +  for (auto &Listener : Listeners)
>> +    Listener->FunctionDefinitionInstantiated(D);
>> +}
>> void MultiplexASTMutationListener::AddedObjCPropertyInClassExtension(
>>                                              const ObjCPropertyDecl *Prop,
>>                                              const ObjCPropertyDecl *OrigProp,
>> 
>> Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
>> +++ cfe/trunk/lib/Serialization/ASTReader.cpp Tue Feb 24 19:31:45 2015
>> @@ -46,6 +46,8 @@
>> #include "llvm/ADT/Hashing.h"
>> #include "llvm/ADT/StringExtras.h"
>> #include "llvm/Bitcode/BitstreamReader.h"
>> +#include "llvm/Object/COFF.h"
>> +#include "llvm/Object/ObjectFile.h"
>> #include "llvm/Support/ErrorHandling.h"
>> #include "llvm/Support/FileSystem.h"
>> #include "llvm/Support/MemoryBuffer.h"
>> @@ -632,6 +634,27 @@ void PCHValidator::ReadCounter(const Mod
>> // AST reader implementation
>> //===----------------------------------------------------------------------===//
>> 
>> +void ASTReader::InitStreamFileWithModule(llvm::MemoryBufferRef Buffer,
>> +                                         llvm::BitstreamReader &StreamFile) {
>> +  if (auto OF = llvm::object::ObjectFile::createObjectFile(Buffer)) {
>> +    bool IsCOFF = isa<llvm::object::COFFObjectFile>(OF.get().get());
>> +    // 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);
>> +        return StreamFile.init((const unsigned char*)Buf.begin(),
>> +                               (const unsigned char*)Buf.end());
>> +      }
>> +    }
>> +  }
>> +  StreamFile.init((const unsigned char *)Buffer.getBufferStart(),
>> +                  (const unsigned char *)Buffer.getBufferEnd());
>> +}
>> +
>> void ASTReader::setDeserializationListener(ASTDeserializationListener *Listener,
>>                                            bool TakeOwnership) {
>>   DeserializationListener = Listener;
>> @@ -3883,9 +3906,10 @@ ASTReader::ReadASTCore(StringRef FileNam
>> 
>>   ModuleFile &F = *M;
>>   BitstreamCursor &Stream = F.Stream;
>> +  InitStreamFileWithModule(F.Buffer->getMemBufferRef(), F.StreamFile);
>>   Stream.init(&F.StreamFile);
>> -  F.SizeInBits = F.Buffer->getBufferSize() * 8;
>> -
>> +  F.SizeInBits = F.StreamFile.getBitcodeBytes().getExtent() * 8;
>> +
>>   // Sniff for the signature.
>>   if (Stream.Read(8) != 'C' ||
>>       Stream.Read(8) != 'P' ||
>> @@ -4174,8 +4198,7 @@ std::string ASTReader::getOriginalSource
>> 
>>   // Initialize the stream
>>   llvm::BitstreamReader StreamFile;
>> -  StreamFile.init((const unsigned char *)(*Buffer)->getBufferStart(),
>> -                  (const unsigned char *)(*Buffer)->getBufferEnd());
>> +  InitStreamFileWithModule((*Buffer)->getMemBufferRef(), StreamFile);
>>   BitstreamCursor Stream(StreamFile);
>> 
>>   // Sniff for the signature.
>> @@ -4270,8 +4293,7 @@ bool ASTReader::readASTFileControlBlock(
>> 
>>   // Initialize the stream
>>   llvm::BitstreamReader StreamFile;
>> -  StreamFile.init((const unsigned char *)(*Buffer)->getBufferStart(),
>> -                  (const unsigned char *)(*Buffer)->getBufferEnd());
>> +  InitStreamFileWithModule((*Buffer)->getMemBufferRef(), StreamFile);
>>   BitstreamCursor Stream(StreamFile);
>> 
>>   // Sniff for the signature.
>> 
>> Modified: cfe/trunk/lib/Serialization/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/CMakeLists.txt?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Serialization/CMakeLists.txt (original)
>> +++ cfe/trunk/lib/Serialization/CMakeLists.txt Tue Feb 24 19:31:45 2015
>> @@ -1,5 +1,6 @@
>> set(LLVM_LINK_COMPONENTS
>>   BitReader
>> +  Object
>>   Support
>>   )
>> 
>> 
>> Modified: cfe/trunk/lib/Serialization/GeneratePCH.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/GeneratePCH.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Serialization/GeneratePCH.cpp (original)
>> +++ cfe/trunk/lib/Serialization/GeneratePCH.cpp Tue Feb 24 19:31:45 2015
>> @@ -19,7 +19,6 @@
>> #include "clang/Lex/Preprocessor.h"
>> #include "clang/Sema/SemaConsumer.h"
>> #include "llvm/Bitcode/BitstreamWriter.h"
>> -#include "llvm/Support/raw_ostream.h"
>> #include <string>
>> 
>> using namespace clang;
>> @@ -28,10 +27,11 @@ PCHGenerator::PCHGenerator(const Preproc
>>                            StringRef OutputFile,
>>                            clang::Module *Module,
>>                            StringRef isysroot,
>> -                           raw_ostream *OS, bool AllowASTWithErrors)
>> +                           bool AllowASTWithErrors)
>>   : PP(PP), OutputFile(OutputFile), Module(Module),
>> -    isysroot(isysroot.str()), Out(OS),
>> -    SemaPtr(nullptr), Stream(Buffer), Writer(Stream),
>> +    isysroot(isysroot.str()),
>> +    SemaPtr(nullptr), Stream(Buffer),
>> +    Writer(Stream),
>>     AllowASTWithErrors(AllowASTWithErrors),
>>     HasEmittedPCH(false) {
>> }
>> @@ -52,14 +52,8 @@ void PCHGenerator::HandleTranslationUnit
>>   assert(SemaPtr && "No Sema?");
>>   Writer.WriteAST(*SemaPtr, OutputFile, Module, isysroot, hasErrors);
>> 
>> -  // Write the generated bitstream to "Out".
>> -  Out->write((char *)&Buffer.front(), Buffer.size());
>> -
>> -  // Make sure it hits disk now.
>> -  Out->flush();
>> -
>> -  // Free up some memory, in case the process is kept alive.
>> -  Buffer.clear();
>> +  if (SerializationFinishedCallback)
>> +    SerializationFinishedCallback(&Buffer);
>> 
>>   HasEmittedPCH = true;
>> }
>> 
>> Modified: cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp (original)
>> +++ cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp Tue Feb 24 19:31:45 2015
>> @@ -15,6 +15,7 @@
>> #include "clang/Basic/FileManager.h"
>> #include "clang/Lex/HeaderSearch.h"
>> #include "clang/Serialization/ASTBitCodes.h"
>> +#include "clang/Serialization/ASTReader.h"
>> #include "clang/Serialization/GlobalModuleIndex.h"
>> #include "clang/Serialization/Module.h"
>> #include "llvm/ADT/DenseMap.h"
>> @@ -501,8 +502,8 @@ bool GlobalModuleIndexBuilder::loadModul
>> 
>>   // Initialize the input stream
>>   llvm::BitstreamReader InStreamFile;
>> -  InStreamFile.init((const unsigned char *)(*Buffer)->getBufferStart(),
>> -                    (const unsigned char *)(*Buffer)->getBufferEnd());
>> +  ASTReader::InitStreamFileWithModule((*Buffer)->getMemBufferRef(),
>> +                                      InStreamFile);
>>   llvm::BitstreamCursor InStream(InStreamFile);
>> 
>>   // Sniff for the signature.
>> 
>> Modified: cfe/trunk/lib/Serialization/ModuleManager.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ModuleManager.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Serialization/ModuleManager.cpp (original)
>> +++ cfe/trunk/lib/Serialization/ModuleManager.cpp Tue Feb 24 19:31:45 2015
>> @@ -13,6 +13,7 @@
>> //===----------------------------------------------------------------------===//
>> #include "clang/Lex/HeaderSearch.h"
>> #include "clang/Lex/ModuleMap.h"
>> +#include "clang/Serialization/ASTReader.h"
>> #include "clang/Serialization/GlobalModuleIndex.h"
>> #include "clang/Serialization/ModuleManager.h"
>> #include "llvm/Support/MemoryBuffer.h"
>> @@ -135,10 +136,10 @@ ModuleManager::addModule(StringRef FileN
>> 
>>       New->Buffer = std::move(*Buf);
>>     }
>> -
>> -    // Initialize the stream
>> -    New->StreamFile.init((const unsigned char *)New->Buffer->getBufferStart(),
>> -                         (const unsigned char *)New->Buffer->getBufferEnd());
>> +
>> +    // Initialize the stream.
>> +    ASTReader::InitStreamFileWithModule(New->Buffer->getMemBufferRef(),
>> +                                        New->StreamFile);
>>   }
>> 
>>   if (ExpectedSignature) {
>> 
>> 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/ARCMT/check-with-pch.m (original)
>> +++ cfe/trunk/test/ARCMT/check-with-pch.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m (original)
>> +++ cfe/trunk/test/ARCMT/migrate-on-pch-and-module.m Tue Feb 24 19:31:45 2015
>> @@ -1,6 +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 -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 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/ARCMT/objcmt-with-pch.m (original)
>> +++ cfe/trunk/test/ARCMT/objcmt-with-pch.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/ARCMT/objcmt-with-pch.m.result (original)
>> +++ cfe/trunk/test/ARCMT/objcmt-with-pch.m.result Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/CMakeLists.txt (original)
>> +++ cfe/trunk/test/CMakeLists.txt Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&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 Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/CodeGen/atomic-ops.c (original)
>> +++ cfe/trunk/test/CodeGen/atomic-ops.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/CodeGen/big-atomic-ops.c (original)
>> +++ cfe/trunk/test/CodeGen/big-atomic-ops.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Frontend/ast-codegen.c (original)
>> +++ cfe/trunk/test/Frontend/ast-codegen.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Index/TestClassForwardDecl.m (original)
>> +++ cfe/trunk/test/Index/TestClassForwardDecl.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Index/c-index-api-loadTU-test.m (original)
>> +++ cfe/trunk/test/Index/c-index-api-loadTU-test.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Index/c-index-getCursor-test.m (original)
>> +++ cfe/trunk/test/Index/c-index-getCursor-test.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Index/pch-with-module.m (original)
>> +++ cfe/trunk/test/Index/pch-with-module.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Index/print-mangled-name.cpp (original)
>> +++ cfe/trunk/test/Index/print-mangled-name.cpp Tue Feb 24 19:31:45 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/dependency-gen-inferred-map.m
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/dependency-gen-inferred-map.m?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/dependency-gen-inferred-map.m (original)
>> +++ cfe/trunk/test/Modules/dependency-gen-inferred-map.m Tue Feb 24 19:31:45 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 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/dependency-gen-pch.m (original)
>> +++ cfe/trunk/test/Modules/dependency-gen-pch.m Tue Feb 24 19:31:45 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 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/irgen.c (original)
>> +++ cfe/trunk/test/Modules/irgen.c Tue Feb 24 19:31:45 2015
>> @@ -1,3 +1,4 @@
>> +// REQUIRES: x86-registered-target
>> // RUN: rm -rf %t
>> // RUN: %clang_cc1 -fmodules -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 -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/module_container.m
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/module_container.m?rev=230423&view=auto
>> ==============================================================================
>> --- cfe/trunk/test/Modules/module_container.m (added)
>> +++ cfe/trunk/test/Modules/module_container.m Tue Feb 24 19:31:45 2015
>> @@ -0,0 +1,14 @@
>> + at import DependsOnModule;
>> +// REQUIRES: x86-registered-target
>> +// RUN: rm -rf %t-MachO %t-ELF %t-COFF
>> +// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fmodules -fdisable-module-hash -fmodules-cache-path=%t-MachO -F %S/Inputs %s
>> +// RUN: %clang_cc1 -triple=x86_64-linux-elf -fmodules -fdisable-module-hash -fmodules-cache-path=%t-ELF -F %S/Inputs %s
>> +// RUN: %clang_cc1 -triple=x86_64-windows-coff -fmodules -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]+}}
>> 
>> 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/self-import-header.m (original)
>> +++ cfe/trunk/test/Modules/self-import-header.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/templates-2.mm (original)
>> +++ cfe/trunk/test/Modules/templates-2.mm Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -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 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/templates.mm (original)
>> +++ cfe/trunk/test/Modules/templates.mm Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -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 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Modules/va_list.m (original)
>> +++ cfe/trunk/test/Modules/va_list.m Tue Feb 24 19:31:45 2015
>> @@ -1,3 +1,4 @@
>> +// REQUIRES: x86-registered-target
>> // RUN: rm -rf %t
>> // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/atomic_read_codegen.c (original)
>> +++ cfe/trunk/test/OpenMP/atomic_read_codegen.c Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/barrier_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/barrier_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/critical_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/critical_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -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/flush_codegen.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/flush_codegen.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/flush_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/flush_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/for_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/for_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -3,9 +3,9 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -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
>> -
>> // CHECK: [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* }
>> // CHECK-LABEL: define {{.*void}} @{{.*}}without_schedule_clause{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}})
>> void without_schedule_clause(float *a, float *b, float *c, float *d) {
>> 
>> Modified: cfe/trunk/test/OpenMP/master_codegen.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/master_codegen.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/master_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/master_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -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/parallel_codegen.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_codegen.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/parallel_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/parallel_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,9 +2,9 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/parallel_private_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/parallel_private_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -4,9 +4,9 @@
>> // RUN: %clang_cc1 -verify -fopenmp=libiomp5 -x c++ -std=c++11 -DLAMBDA -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=LAMBDA %s
>> // RUN: %clang_cc1 -verify -fopenmp=libiomp5 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/simd_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/simd_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -1,7 +1,7 @@
>> // RUN: %clang_cc1 -verify -fopenmp=libiomp5 -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
>> -//
>> +// 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/single_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/single_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -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/taskyield_codegen.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskyield_codegen.cpp?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/taskyield_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/taskyield_codegen.cpp Tue Feb 24 19:31:45 2015
>> @@ -2,7 +2,7 @@
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s
>> // RUN: %clang_cc1 -fopenmp=libiomp5 -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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/OpenMP/threadprivate_codegen.cpp (original)
>> +++ cfe/trunk/test/OpenMP/threadprivate_codegen.cpp Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/__va_list_tag.c (original)
>> +++ cfe/trunk/test/PCH/__va_list_tag.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/arc.m (original)
>> +++ cfe/trunk/test/PCH/arc.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/asm.c (original)
>> +++ cfe/trunk/test/PCH/asm.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/chain-external-defs.c (original)
>> +++ cfe/trunk/test/PCH/chain-external-defs.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/chain-trivial.c (original)
>> +++ cfe/trunk/test/PCH/chain-trivial.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&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 Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/external-defs.c (original)
>> +++ cfe/trunk/test/PCH/external-defs.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/floating-literal.c (original)
>> +++ cfe/trunk/test/PCH/floating-literal.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/local_static.cpp (original)
>> +++ cfe/trunk/test/PCH/local_static.cpp Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/pchpch.c (original)
>> +++ cfe/trunk/test/PCH/pchpch.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/reloc.c (original)
>> +++ cfe/trunk/test/PCH/reloc.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/subscripting-literals.m (original)
>> +++ cfe/trunk/test/PCH/subscripting-literals.m Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/target-options.c (original)
>> +++ cfe/trunk/test/PCH/target-options.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/tentative-defs.c (original)
>> +++ cfe/trunk/test/PCH/tentative-defs.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/thread-local.cpp (original)
>> +++ cfe/trunk/test/PCH/thread-local.cpp Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/va_arg.c (original)
>> +++ cfe/trunk/test/PCH/va_arg.c Tue Feb 24 19:31:45 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/PCH/va_arg.cpp (original)
>> +++ cfe/trunk/test/PCH/va_arg.cpp Tue Feb 24 19:31:45 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/arcmt-test/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/arcmt-test/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/arcmt-test/Makefile (original)
>> +++ cfe/trunk/tools/arcmt-test/Makefile Tue Feb 24 19:31:45 2015
>> @@ -17,9 +17,11 @@ TOOL_NO_EXPORTS = 1
>> NO_INSTALL = 1
>> 
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation ipo mc objcarcopts option support
>> USEDLIBS = clangARCMigrate.a clangRewrite.a \
>> -                clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
>> +                clangFrontend.a clangCodeGen.a \
>> +                 clangDriver.a clangSerialization.a clangParse.a \
>>                 clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a \
>>                 clangBasic.a
>> 
>> 
>> Modified: cfe/trunk/tools/c-arcmt-test/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-arcmt-test/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/c-arcmt-test/Makefile (original)
>> +++ cfe/trunk/tools/c-arcmt-test/Makefile Tue Feb 24 19:31:45 2015
>> @@ -21,7 +21,8 @@ NO_INSTALL = 1
>> # LINK_COMPONENTS before including Makefile.rules
>> include $(CLANG_LEVEL)/../../Makefile.config
>> 
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation ipo support mc objcarcopts option
>> 
>> # Note that 'USEDLIBS' must include all of the core clang libraries
>> # when -static is given to linker on cygming.
>> @@ -33,7 +34,7 @@ USEDLIBS = clang.a \
>>           clangToolingCore.a \
>>           clangRewriteFrontend.a \
>>           clangRewrite.a \
>> -          clangFrontend.a clangDriver.a \
>> +          clangFrontend.a clangCodeGen.a clangDriver.a \
>>           clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
>>           clangSerialization.a clangParse.a clangSema.a \
>>           clangAnalysis.a clangEdit.a clangAST.a clangLex.a clangBasic.a
>> 
>> Modified: cfe/trunk/tools/c-index-test/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/c-index-test/Makefile (original)
>> +++ cfe/trunk/tools/c-index-test/Makefile Tue Feb 24 19:31:45 2015
>> @@ -22,13 +22,15 @@ TOOL_NO_EXPORTS = 1
>> # LINK_COMPONENTS before including Makefile.rules
>> include $(CLANG_LEVEL)/../../Makefile.config
>> 
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation ipo support mc objcarcopts option
>> 
>> # Note that 'USEDLIBS' must include all of the core clang libraries
>> # when -static is given to linker on cygming.
>> USEDLIBS = clang.a \
>>           clangIndex.a clangFormat.a clangRewrite.a \
>> -          clangFrontend.a clangDriver.a \
>> +           clangCodeGen.a \
>> +          clangFrontend.a clangCodeGen.a clangDriver.a \
>>           clangTooling.a \
>>           clangToolingCore.a \
>>           clangSerialization.a clangParse.a clangSema.a \
>> 
>> Modified: cfe/trunk/tools/clang-check/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/clang-check/Makefile (original)
>> +++ cfe/trunk/tools/clang-check/Makefile Tue Feb 24 19:31:45 2015
>> @@ -15,8 +15,9 @@ 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 bitwriter \
>> +                   instrumentation ipo mc option objcarcopts support
>> +USEDLIBS = clangFrontend.a clangCodeGen.a clangSerialization.a clangDriver.a \
>>            clangTooling.a clangParse.a clangSema.a \
>>            clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
>>            clangStaticAnalyzerCore.a clangAnalysis.a clangRewriteFrontend.a \
>> 
>> Modified: cfe/trunk/tools/diagtool/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/diagtool/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/diagtool/Makefile (original)
>> +++ cfe/trunk/tools/diagtool/Makefile Tue Feb 24 19:31:45 2015
>> @@ -20,7 +20,7 @@ include $(CLANG_LEVEL)/../../Makefile.co
>> LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
>>            clangSema.a clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
>> -           clangBasic.a
>> +           clangBasic.a clangCodeGen.a
>> 
>> include $(CLANG_LEVEL)/Makefile
>> 
>> 
>> Modified: cfe/trunk/tools/libclang/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/libclang/CMakeLists.txt (original)
>> +++ cfe/trunk/tools/libclang/CMakeLists.txt Tue Feb 24 19:31:45 2015
>> @@ -40,6 +40,7 @@ set(SOURCES
>> 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=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/libclang/Makefile (original)
>> +++ cfe/trunk/tools/libclang/Makefile Tue Feb 24 19:31:45 2015
>> @@ -16,12 +16,13 @@ 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
>> 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 \
>> 
>> Modified: cfe/trunk/unittests/AST/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/AST/Makefile (original)
>> +++ cfe/trunk/unittests/AST/Makefile Tue Feb 24 19:31:45 2015
>> @@ -10,9 +10,10 @@
>> CLANG_LEVEL = ../..
>> TESTNAME = AST
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation mc option objcarcopts support
>> USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
>> -           clangRewrite.a clangRewriteFrontend.a \
>> +           clangCodeGen.a clangRewrite.a clangRewriteFrontend.a \
>>            clangParse.a clangSema.a clangAnalysis.a \
>>            clangEdit.a clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
>> 
>> 
>> Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/Dynamic/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/ASTMatchers/Dynamic/Makefile (original)
>> +++ cfe/trunk/unittests/ASTMatchers/Dynamic/Makefile Tue Feb 24 19:31:45 2015
>> @@ -11,10 +11,11 @@ CLANG_LEVEL = ../../..
>> 
>> TESTNAME = DynamicASTMatchers
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> -USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
>> -           clangRewrite.a clangRewriteFrontend.a clangParse.a clangSema.a \
>> -           clangAnalysis.a clangEdit.a clangAST.a clangASTMatchers.a \
>> -           clangLex.a clangBasic.a clangDynamicASTMatchers.a
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation ipo mc option objcarcopts support
>> +USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a    \
>> +           clangCodeGen.a clangRewrite.a clangRewriteFrontend.a clangParse.a    \
>> +           clangSema.a clangAnalysis.a clangEdit.a clangAST.a                   \
>> +           clangASTMatchers.a clangLex.a clangBasic.a clangDynamicASTMatchers.a
>> 
>> include $(CLANG_LEVEL)/unittests/Makefile
>> 
>> Modified: cfe/trunk/unittests/ASTMatchers/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/ASTMatchers/Makefile (original)
>> +++ cfe/trunk/unittests/ASTMatchers/Makefile Tue Feb 24 19:31:45 2015
>> @@ -13,9 +13,10 @@ PARALLEL_DIRS = Dynamic
>> 
>> TESTNAME = ASTMatchers
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation mc option objcarcopts support
>> USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
>> -           clangRewrite.a clangRewriteFrontend.a \
>> +           clangCodeGen.a clangRewrite.a clangRewriteFrontend.a \
>>            clangParse.a clangSema.a clangAnalysis.a \
>>            clangEdit.a clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
>> 
>> 
>> Modified: cfe/trunk/unittests/CodeGen/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CodeGen/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/CodeGen/Makefile (original)
>> +++ cfe/trunk/unittests/CodeGen/Makefile Tue Feb 24 19:31:45 2015
>> @@ -10,9 +10,9 @@
>> CLANG_LEVEL = ../..
>> TESTNAME = CodeGen
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader mc option \
>> -                   profiledata support
>> -USEDLIBS = clangCodeGen.a clangFrontend.a clangSerialization.a \
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation ipo mc option objcarcopts profiledata support
>> +USEDLIBS = clangFrontend.a clangCodeGen.a clangSerialization.a \
>>            clangDriver.a \
>>            clangParse.a clangSema.a clangAnalysis.a \
>>            clangEdit.a clangAST.a clangLex.a clangBasic.a
>> 
>> Modified: cfe/trunk/unittests/Frontend/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/Frontend/Makefile (original)
>> +++ cfe/trunk/unittests/Frontend/Makefile Tue Feb 24 19:31:45 2015
>> @@ -10,7 +10,8 @@
>> CLANG_LEVEL = ../..
>> TESTNAME = Frontend
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation mc option objcarcopts support
>> USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
>>            clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
>>            clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
>> 
>> Modified: cfe/trunk/unittests/Sema/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/Sema/Makefile (original)
>> +++ cfe/trunk/unittests/Sema/Makefile Tue Feb 24 19:31:45 2015
>> @@ -10,9 +10,10 @@
>> CLANG_LEVEL = ../..
>> TESTNAME = Sema
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation mc option objcarcopts support
>> USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
>> -           clangRewrite.a clangRewriteFrontend.a \
>> +           clangCodeGen.a clangRewrite.a clangRewriteFrontend.a \
>>            clangParse.a clangSema.a clangAnalysis.a \
>>            clangEdit.a clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
>> 
>> 
>> Modified: cfe/trunk/unittests/Tooling/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/Tooling/Makefile (original)
>> +++ cfe/trunk/unittests/Tooling/Makefile Tue Feb 24 19:31:45 2015
>> @@ -10,9 +10,10 @@
>> CLANG_LEVEL = ../..
>> TESTNAME = Tooling
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter \
>> +                   instrumentation ipo mc option objcarcopts support
>> USEDLIBS = clangTooling.a clangToolingCore.a clangFrontend.a \
>> -          clangSerialization.a clangDriver.a \
>> +          clangCodeGen.a clangSerialization.a clangDriver.a \
>>            clangParse.a clangRewrite.a clangRewriteFrontend.a \
>>           clangSema.a clangAnalysis.a clangEdit.a \
>>            clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
>> 
>> Modified: cfe/trunk/unittests/libclang/Makefile
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/libclang/Makefile?rev=230423&r1=230422&r2=230423&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/libclang/Makefile (original)
>> +++ cfe/trunk/unittests/libclang/Makefile Tue Feb 24 19:31:45 2015
>> @@ -12,13 +12,14 @@ TESTNAME = libclang
>> LINK_LIBS_IN_SHARED := 1
>> 
>> include $(CLANG_LEVEL)/../../Makefile.config
>> -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
>> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
>> +                   instrumentation bitwriter support mc option
>> 
>> # Note that 'USEDLIBS' must include all of the core clang libraries
>> # when -static is given to linker on cygming.
>> USEDLIBS = clang.a \
>>           clangIndex.a clangFormat.a clangRewrite.a \
>> -          clangFrontend.a clangDriver.a \
>> +          clangCodeGen.a clangFrontend.a clangDriver.a \
>>           clangTooling.a \
>>           clangToolingCore.a \
>>           clangSerialization.a clangParse.a clangSema.a \
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list