svn commit: r311534 - in vendor/clang/dist: examples/clang-interpreter include/clang/AST include/clang/ASTMatchers/Dynamic include/clang/Basic include/clang/CodeGen include/clang/Driver include/cla...
Dimitry Andric
dim at FreeBSD.org
Fri Jan 6 20:13:39 UTC 2017
Author: dim
Date: Fri Jan 6 20:13:35 2017
New Revision: 311534
URL: https://svnweb.freebsd.org/changeset/base/311534
Log:
Vendor import of clang trunk r291274:
https://llvm.org/svn/llvm-project/cfe/trunk@291274
Added:
vendor/clang/dist/test/CodeGen/builtins-ppc-error.c (contents, props changed)
vendor/clang/dist/test/CodeGen/include/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/.keep
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/.keep
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/.keep
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_30.10.bc
vendor/clang/dist/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_35.10.bc
vendor/clang/dist/test/Driver/avr-toolchain.c (contents, props changed)
vendor/clang/dist/test/Driver/cuda-windows.cu
vendor/clang/dist/test/SemaCUDA/attr-declspec.cu
vendor/clang/dist/test/SemaCUDA/cuda-inherits-calling-conv.cu
Modified:
vendor/clang/dist/examples/clang-interpreter/main.cpp
vendor/clang/dist/include/clang/AST/DeclCXX.h
vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h
vendor/clang/dist/include/clang/Basic/Attr.td
vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def
vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
vendor/clang/dist/include/clang/CodeGen/BackendUtil.h
vendor/clang/dist/include/clang/Driver/ToolChain.h
vendor/clang/dist/include/clang/Frontend/ASTUnit.h
vendor/clang/dist/include/clang/Frontend/CompilerInstance.h
vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h
vendor/clang/dist/include/clang/Frontend/FrontendOptions.h
vendor/clang/dist/include/clang/Frontend/Utils.h
vendor/clang/dist/include/clang/Lex/HeaderSearch.h
vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h
vendor/clang/dist/include/clang/Lex/Preprocessor.h
vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h
vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h
vendor/clang/dist/include/clang/Sema/Ownership.h
vendor/clang/dist/include/clang/Sema/Sema.h
vendor/clang/dist/include/clang/Serialization/ASTReader.h
vendor/clang/dist/include/clang/Serialization/ASTWriter.h
vendor/clang/dist/include/clang/Serialization/ModuleFileExtension.h
vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerManager.h
vendor/clang/dist/include/clang/Tooling/Tooling.h
vendor/clang/dist/lib/ARCMigrate/ARCMT.cpp
vendor/clang/dist/lib/AST/ASTContext.cpp
vendor/clang/dist/lib/ASTMatchers/Dynamic/VariantValue.cpp
vendor/clang/dist/lib/Basic/Targets.cpp
vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
vendor/clang/dist/lib/CodeGen/CGCall.cpp
vendor/clang/dist/lib/CodeGen/CGExpr.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.h
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp
vendor/clang/dist/lib/CodeGen/CodeGenFunction.h
vendor/clang/dist/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
vendor/clang/dist/lib/Driver/Driver.cpp
vendor/clang/dist/lib/Driver/MSVCToolChain.cpp
vendor/clang/dist/lib/Driver/MinGWToolChain.cpp
vendor/clang/dist/lib/Driver/ToolChains.cpp
vendor/clang/dist/lib/Driver/ToolChains.h
vendor/clang/dist/lib/Driver/Tools.cpp
vendor/clang/dist/lib/Driver/Tools.h
vendor/clang/dist/lib/Frontend/ASTUnit.cpp
vendor/clang/dist/lib/Frontend/ChainedIncludesSource.cpp
vendor/clang/dist/lib/Frontend/CompilerInstance.cpp
vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp
vendor/clang/dist/lib/Frontend/FrontendAction.cpp
vendor/clang/dist/lib/Frontend/SerializedDiagnosticPrinter.cpp
vendor/clang/dist/lib/Frontend/TestModuleFileExtension.cpp
vendor/clang/dist/lib/Headers/__clang_cuda_cmath.h
vendor/clang/dist/lib/Headers/__clang_cuda_intrinsics.h
vendor/clang/dist/lib/Headers/altivec.h
vendor/clang/dist/lib/Headers/intrin.h
vendor/clang/dist/lib/Lex/HeaderSearch.cpp
vendor/clang/dist/lib/Lex/Preprocessor.cpp
vendor/clang/dist/lib/Parse/ParseDecl.cpp
vendor/clang/dist/lib/Parse/ParseExpr.cpp
vendor/clang/dist/lib/Parse/ParsePragma.cpp
vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp
vendor/clang/dist/lib/Sema/SemaExpr.cpp
vendor/clang/dist/lib/Sema/SemaExprCXX.cpp
vendor/clang/dist/lib/Sema/SemaOverload.cpp
vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp
vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
vendor/clang/dist/lib/Serialization/ASTReader.cpp
vendor/clang/dist/lib/Serialization/ASTWriter.cpp
vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp
vendor/clang/dist/lib/Serialization/GeneratePCH.cpp
vendor/clang/dist/lib/Serialization/GlobalModuleIndex.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp
vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
vendor/clang/dist/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
vendor/clang/dist/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
vendor/clang/dist/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
vendor/clang/dist/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
vendor/clang/dist/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
vendor/clang/dist/lib/Tooling/Tooling.cpp
vendor/clang/dist/test/CodeGen/builtins-ppc-p9vector.c
vendor/clang/dist/test/CodeGen/catch-undef-behavior.c
vendor/clang/dist/test/CodeGen/sanitize-recover.c
vendor/clang/dist/test/CodeGen/vectorcall.c
vendor/clang/dist/test/CodeGenCXX/dllexport.cpp
vendor/clang/dist/test/CodeGenCXX/homogeneous-aggregates.cpp
vendor/clang/dist/test/CodeGenCXX/ubsan-vtable-checks.cpp
vendor/clang/dist/test/Driver/cuda-version-check.cu
vendor/clang/dist/test/Index/complete-block-properties.m
vendor/clang/dist/test/Index/complete-block-property-assignment.m
vendor/clang/dist/test/OpenMP/nvptx_target_codegen.cpp
vendor/clang/dist/test/OpenMP/target_codegen.cpp
vendor/clang/dist/test/OpenMP/target_codegen_registration.cpp
vendor/clang/dist/test/OpenMP/teams_distribute_collapse_messages.cpp
vendor/clang/dist/test/Preprocessor/cuda-types.cu
vendor/clang/dist/test/Preprocessor/init.c
vendor/clang/dist/test/Sema/warn-cast-align.c
vendor/clang/dist/test/Sema/warn-strict-prototypes.m
vendor/clang/dist/test/Sema/warn-thread-safety-analysis.c
vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp
vendor/clang/dist/test/SemaCXX/conversion-function.cpp
vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
vendor/clang/dist/test/SemaCXX/cxx1z-decomposition.cpp
vendor/clang/dist/test/SemaCXX/default-arg-closures.cpp
vendor/clang/dist/test/SemaCXX/dllexport.cpp
vendor/clang/dist/test/SemaCXX/type-definition-in-specifier.cpp
vendor/clang/dist/test/SemaObjC/block-omitted-return-type.m
vendor/clang/dist/test/SemaOpenCL/extensions.cl
vendor/clang/dist/test/SemaTemplate/deduction.cpp
vendor/clang/dist/test/SemaTemplate/instantiate-local-class.cpp
vendor/clang/dist/tools/c-index-test/core_main.cpp
vendor/clang/dist/tools/clang-import-test/clang-import-test.cpp
vendor/clang/dist/tools/diagtool/ShowEnabledWarnings.cpp
vendor/clang/dist/tools/libclang/CIndex.cpp
vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp
vendor/clang/dist/tools/libclang/CXIndexDataConsumer.cpp
vendor/clang/dist/tools/libclang/CXIndexDataConsumer.h
vendor/clang/dist/tools/libclang/CXTranslationUnit.h
vendor/clang/dist/tools/libclang/Indexing.cpp
vendor/clang/dist/unittests/AST/ExternalASTSourceTest.cpp
vendor/clang/dist/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
vendor/clang/dist/unittests/Basic/SourceManagerTest.cpp
vendor/clang/dist/unittests/Format/FormatTestJS.cpp
vendor/clang/dist/unittests/Frontend/CodeGenActionTest.cpp
vendor/clang/dist/unittests/Frontend/FrontendActionTest.cpp
vendor/clang/dist/unittests/Lex/LexerTest.cpp
vendor/clang/dist/unittests/Lex/PPCallbacksTest.cpp
vendor/clang/dist/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp
Modified: vendor/clang/dist/examples/clang-interpreter/main.cpp
==============================================================================
--- vendor/clang/dist/examples/clang-interpreter/main.cpp Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/examples/clang-interpreter/main.cpp Fri Jan 6 20:13:35 2017 (r311534)
@@ -145,7 +145,7 @@ int main(int argc, const char **argv, ch
// Create a compiler instance to handle the actual work.
CompilerInstance Clang;
- Clang.setInvocation(CI.release());
+ Clang.setInvocation(std::move(CI));
// Create the compilers actual diagnostics engine.
Clang.createDiagnostics();
Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -3181,7 +3181,7 @@ public:
/// Get the using declaration from which this was instantiated. This will
/// always be an UnresolvedUsingValueDecl or an UnresolvedUsingTypenameDecl
/// that is a pack expansion.
- NamedDecl *getInstantiatedFromUsingDecl() { return InstantiatedFrom; }
+ NamedDecl *getInstantiatedFromUsingDecl() const { return InstantiatedFrom; }
/// Get the set of using declarations that this pack expanded into. Note that
/// some of these may still be unresolved.
Modified: vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h
==============================================================================
--- vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -119,7 +119,7 @@ class VariantMatcher {
/// \brief Payload interface to be specialized by each matcher type.
///
/// It follows a similar interface as VariantMatcher itself.
- class Payload : public RefCountedBase<Payload> {
+ class Payload {
public:
virtual ~Payload();
virtual llvm::Optional<DynTypedMatcher> getSingleMatcher() const = 0;
@@ -208,7 +208,8 @@ public:
std::string getTypeAsString() const;
private:
- explicit VariantMatcher(Payload *Value) : Value(Value) {}
+ explicit VariantMatcher(std::shared_ptr<Payload> Value)
+ : Value(std::move(Value)) {}
template <typename T> struct TypedMatcherOps;
@@ -216,7 +217,7 @@ private:
class PolymorphicPayload;
class VariadicOpPayload;
- IntrusiveRefCntPtr<const Payload> Value;
+ std::shared_ptr<const Payload> Value;
};
template <typename T>
Modified: vendor/clang/dist/include/clang/Basic/Attr.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/Attr.td Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Basic/Attr.td Fri Jan 6 20:13:35 2017 (r311534)
@@ -601,49 +601,53 @@ def Constructor : InheritableAttr {
let Documentation = [Undocumented];
}
+// CUDA attributes are spelled __attribute__((attr)) or __declspec(__attr__).
+
def CUDAConstant : InheritableAttr {
- let Spellings = [GNU<"constant">];
+ let Spellings = [GNU<"constant">, Declspec<"__constant__">];
let Subjects = SubjectList<[Var]>;
let LangOpts = [CUDA];
let Documentation = [Undocumented];
}
def CUDACudartBuiltin : IgnoredAttr {
- let Spellings = [GNU<"cudart_builtin">];
+ let Spellings = [GNU<"cudart_builtin">, Declspec<"__cudart_builtin__">];
let LangOpts = [CUDA];
}
def CUDADevice : InheritableAttr {
- let Spellings = [GNU<"device">];
+ let Spellings = [GNU<"device">, Declspec<"__device__">];
let Subjects = SubjectList<[Function, Var]>;
let LangOpts = [CUDA];
let Documentation = [Undocumented];
}
def CUDADeviceBuiltin : IgnoredAttr {
- let Spellings = [GNU<"device_builtin">];
+ let Spellings = [GNU<"device_builtin">, Declspec<"__device_builtin__">];
let LangOpts = [CUDA];
}
def CUDADeviceBuiltinSurfaceType : IgnoredAttr {
- let Spellings = [GNU<"device_builtin_surface_type">];
+ let Spellings = [GNU<"device_builtin_surface_type">,
+ Declspec<"__device_builtin_surface_type__">];
let LangOpts = [CUDA];
}
def CUDADeviceBuiltinTextureType : IgnoredAttr {
- let Spellings = [GNU<"device_builtin_texture_type">];
+ let Spellings = [GNU<"device_builtin_texture_type">,
+ Declspec<"__device_builtin_texture_type__">];
let LangOpts = [CUDA];
}
def CUDAGlobal : InheritableAttr {
- let Spellings = [GNU<"global">];
+ let Spellings = [GNU<"global">, Declspec<"__global__">];
let Subjects = SubjectList<[Function]>;
let LangOpts = [CUDA];
let Documentation = [Undocumented];
}
def CUDAHost : InheritableAttr {
- let Spellings = [GNU<"host">];
+ let Spellings = [GNU<"host">, Declspec<"__host__">];
let Subjects = SubjectList<[Function]>;
let LangOpts = [CUDA];
let Documentation = [Undocumented];
@@ -657,7 +661,7 @@ def CUDAInvalidTarget : InheritableAttr
}
def CUDALaunchBounds : InheritableAttr {
- let Spellings = [GNU<"launch_bounds">];
+ let Spellings = [GNU<"launch_bounds">, Declspec<"__launch_bounds__">];
let Args = [ExprArgument<"MaxThreads">, ExprArgument<"MinBlocks", 1>];
let LangOpts = [CUDA];
let Subjects = SubjectList<[ObjCMethod, FunctionLike], WarnDiag,
@@ -669,7 +673,7 @@ def CUDALaunchBounds : InheritableAttr {
}
def CUDAShared : InheritableAttr {
- let Spellings = [GNU<"shared">];
+ let Spellings = [GNU<"shared">, Declspec<"__shared__">];
let Subjects = SubjectList<[Var]>;
let LangOpts = [CUDA];
let Documentation = [Undocumented];
@@ -1195,6 +1199,8 @@ def NoThrow : InheritableAttr {
}
def NvWeak : IgnoredAttr {
+ // No Declspec spelling of this attribute; the CUDA headers use
+ // __attribute__((nv_weak)) unconditionally.
let Spellings = [GNU<"nv_weak">];
let LangOpts = [CUDA];
}
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def Fri Jan 6 20:13:35 2017 (r311534)
@@ -417,6 +417,9 @@ BUILTIN(__builtin_vsx_xvcvhpsp, "V4fV8Us
BUILTIN(__builtin_vsx_xvtstdcdp, "V2ULLiV2dIi", "")
BUILTIN(__builtin_vsx_xvtstdcsp, "V4UiV4fIi", "")
+BUILTIN(__builtin_vsx_insertword, "V16UcV4UiV16UcIi", "")
+BUILTIN(__builtin_vsx_extractuword, "V2ULLiV16UcIi", "")
+
// HTM builtins
BUILTIN(__builtin_tbegin, "UiUIi", "")
BUILTIN(__builtin_tend, "UiUIi", "")
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Fri Jan 6 20:13:35 2017 (r311534)
@@ -3377,8 +3377,10 @@ def note_addrof_ovl_candidate_disabled_b
"candidate function made ineligible by enable_if">;
def note_ovl_candidate_deduced_mismatch : Note<
"candidate template ignored: deduced type "
- "%diff{$ of %ordinal0 parameter does not match adjusted type $ of argument"
- "|of %ordinal0 parameter does not match adjusted type of argument}1,2%3">;
+ "%diff{$ of %select{|element of }4%ordinal0 parameter does not match "
+ "adjusted type $ of %select{|element of }4argument"
+ "|of %select{|element of }4%ordinal0 parameter does not match "
+ "adjusted type of %select{|element of }4argument}1,2%3">;
def note_ovl_candidate_non_deduced_mismatch : Note<
"candidate template ignored: could not match %diff{$ against $|types}0,1">;
// This note is needed because the above note would sometimes print two
Modified: vendor/clang/dist/include/clang/CodeGen/BackendUtil.h
==============================================================================
--- vendor/clang/dist/include/clang/CodeGen/BackendUtil.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/CodeGen/BackendUtil.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -21,6 +21,7 @@ namespace llvm {
namespace clang {
class DiagnosticsEngine;
+ class HeaderSearchOptions;
class CodeGenOptions;
class TargetOptions;
class LangOptions;
@@ -34,7 +35,8 @@ namespace clang {
Backend_EmitObj ///< Emit native object files
};
- void EmitBackendOutput(DiagnosticsEngine &Diags, const CodeGenOptions &CGOpts,
+ void EmitBackendOutput(DiagnosticsEngine &Diags, const HeaderSearchOptions &,
+ const CodeGenOptions &CGOpts,
const TargetOptions &TOpts, const LangOptions &LOpts,
const llvm::DataLayout &TDesc, llvm::Module *M,
BackendAction Action,
Modified: vendor/clang/dist/include/clang/Driver/ToolChain.h
==============================================================================
--- vendor/clang/dist/include/clang/Driver/ToolChain.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Driver/ToolChain.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -139,6 +139,13 @@ public:
vfs::FileSystem &getVFS() const;
const llvm::Triple &getTriple() const { return Triple; }
+ /// Get the toolchain's aux triple, if it has one.
+ ///
+ /// Exactly what the aux triple represents depends on the toolchain, but for
+ /// example when compiling CUDA code for the GPU, the triple might be NVPTX,
+ /// while the aux triple is the host (CPU) toolchain, e.g. x86-linux-gnu.
+ virtual const llvm::Triple *getAuxTriple() const { return nullptr; }
+
llvm::Triple::ArchType getArch() const { return Triple.getArch(); }
StringRef getArchName() const { return Triple.getArchName(); }
StringRef getPlatform() const { return Triple.getVendorName(); }
Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -86,10 +86,10 @@ private:
IntrusiveRefCntPtr<SourceManager> SourceMgr;
std::unique_ptr<HeaderSearch> HeaderInfo;
IntrusiveRefCntPtr<TargetInfo> Target;
- IntrusiveRefCntPtr<Preprocessor> PP;
+ std::shared_ptr<Preprocessor> PP;
IntrusiveRefCntPtr<ASTContext> Ctx;
std::shared_ptr<TargetOptions> TargetOpts;
- IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts;
+ std::shared_ptr<HeaderSearchOptions> HSOpts;
IntrusiveRefCntPtr<ASTReader> Reader;
bool HadModuleLoaderFatalFailure;
@@ -108,8 +108,8 @@ private:
/// Optional owned invocation, just used to make the invocation used in
/// LoadFromCommandLine available.
- IntrusiveRefCntPtr<CompilerInvocation> Invocation;
-
+ std::shared_ptr<CompilerInvocation> Invocation;
+
// OnlyLocalDecls - when true, walking this AST should only visit declarations
// that come from the AST itself, not from included precompiled headers.
// FIXME: This is temporary; eventually, CIndex will always do this.
@@ -358,22 +358,21 @@ public:
}
/// \brief Retrieve the allocator used to cache global code completions.
- IntrusiveRefCntPtr<GlobalCodeCompletionAllocator>
+ std::shared_ptr<GlobalCodeCompletionAllocator>
getCachedCompletionAllocator() {
return CachedCompletionAllocator;
}
CodeCompletionTUInfo &getCodeCompletionTUInfo() {
if (!CCTUInfo)
- CCTUInfo.reset(new CodeCompletionTUInfo(
- new GlobalCodeCompletionAllocator));
+ CCTUInfo = llvm::make_unique<CodeCompletionTUInfo>(
+ std::make_shared<GlobalCodeCompletionAllocator>());
return *CCTUInfo;
}
private:
/// \brief Allocator used to store cached code completions.
- IntrusiveRefCntPtr<GlobalCodeCompletionAllocator>
- CachedCompletionAllocator;
+ std::shared_ptr<GlobalCodeCompletionAllocator> CachedCompletionAllocator;
std::unique_ptr<CodeCompletionTUInfo> CCTUInfo;
@@ -496,12 +495,13 @@ public:
const Preprocessor &getPreprocessor() const { return *PP; }
Preprocessor &getPreprocessor() { return *PP; }
+ std::shared_ptr<Preprocessor> getPreprocessorPtr() const { return PP; }
const ASTContext &getASTContext() const { return *Ctx; }
ASTContext &getASTContext() { return *Ctx; }
void setASTContext(ASTContext *ctx) { Ctx = ctx; }
- void setPreprocessor(Preprocessor *pp);
+ void setPreprocessor(std::shared_ptr<Preprocessor> pp);
bool hasSema() const { return (bool)TheSema; }
Sema &getSema() const {
@@ -701,11 +701,11 @@ public:
/// remapped contents of that file.
typedef std::pair<std::string, llvm::MemoryBuffer *> RemappedFile;
- /// \brief Create a ASTUnit. Gets ownership of the passed CompilerInvocation.
- static ASTUnit *create(CompilerInvocation *CI,
- IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
- bool CaptureDiagnostics,
- bool UserFilesAreVolatile);
+ /// \brief Create a ASTUnit. Gets ownership of the passed CompilerInvocation.
+ static std::unique_ptr<ASTUnit>
+ create(std::shared_ptr<CompilerInvocation> CI,
+ IntrusiveRefCntPtr<DiagnosticsEngine> Diags, bool CaptureDiagnostics,
+ bool UserFilesAreVolatile);
/// \brief Create a ASTUnit from an AST file.
///
@@ -770,7 +770,7 @@ public:
/// created ASTUnit was passed in \p Unit then the caller can check that.
///
static ASTUnit *LoadFromCompilerInvocationAction(
- CompilerInvocation *CI,
+ std::shared_ptr<CompilerInvocation> CI,
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
FrontendAction *Action = nullptr, ASTUnit *Unit = nullptr,
@@ -797,7 +797,7 @@ public:
// FIXME: Move OnlyLocalDecls, UseBumpAllocator to setters on the ASTUnit, we
// shouldn't need to specify them at construction time.
static std::unique_ptr<ASTUnit> LoadFromCompilerInvocation(
- CompilerInvocation *CI,
+ std::shared_ptr<CompilerInvocation> CI,
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
IntrusiveRefCntPtr<DiagnosticsEngine> Diags, FileManager *FileMgr,
bool OnlyLocalDecls = false, bool CaptureDiagnostics = false,
Modified: vendor/clang/dist/include/clang/Frontend/CompilerInstance.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/CompilerInstance.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Frontend/CompilerInstance.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -70,7 +70,7 @@ class TargetInfo;
/// and a long form that takes explicit instances of any required objects.
class CompilerInstance : public ModuleLoader {
/// The options used in this compiler instance.
- IntrusiveRefCntPtr<CompilerInvocation> Invocation;
+ std::shared_ptr<CompilerInvocation> Invocation;
/// The diagnostics engine instance.
IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics;
@@ -91,7 +91,7 @@ class CompilerInstance : public ModuleLo
IntrusiveRefCntPtr<SourceManager> SourceMgr;
/// The preprocessor.
- IntrusiveRefCntPtr<Preprocessor> PP;
+ std::shared_ptr<Preprocessor> PP;
/// The AST context.
IntrusiveRefCntPtr<ASTContext> Context;
@@ -228,7 +228,7 @@ public:
}
/// setInvocation - Replace the current invocation.
- void setInvocation(CompilerInvocation *Value);
+ void setInvocation(std::shared_ptr<CompilerInvocation> Value);
/// \brief Indicates whether we should (re)build the global module index.
bool shouldBuildGlobalModuleIndex() const;
@@ -288,6 +288,9 @@ public:
const HeaderSearchOptions &getHeaderSearchOpts() const {
return Invocation->getHeaderSearchOpts();
}
+ std::shared_ptr<HeaderSearchOptions> getHeaderSearchOptsPtr() const {
+ return Invocation->getHeaderSearchOptsPtr();
+ }
LangOptions &getLangOpts() {
return *Invocation->getLangOpts();
@@ -433,13 +436,14 @@ public:
return *PP;
}
+ std::shared_ptr<Preprocessor> getPreprocessorPtr() { return PP; }
+
void resetAndLeakPreprocessor() {
- BuryPointer(PP.get());
- PP.resetWithoutRelease();
+ BuryPointer(new std::shared_ptr<Preprocessor>(PP));
}
/// Replace the current preprocessor.
- void setPreprocessor(Preprocessor *Value);
+ void setPreprocessor(std::shared_ptr<Preprocessor> Value);
/// }
/// @name ASTContext
@@ -653,7 +657,7 @@ public:
StringRef Path, StringRef Sysroot, bool DisablePCHValidation,
bool AllowPCHWithCompilerErrors, Preprocessor &PP, ASTContext &Context,
const PCHContainerReader &PCHContainerRdr,
- ArrayRef<IntrusiveRefCntPtr<ModuleFileExtension>> Extensions,
+ ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
void *DeserializationListener, bool OwnDeserializationListener,
bool Preamble, bool UseGlobalModuleIndex);
Modified: vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -51,7 +51,7 @@ bool ParseDiagnosticArgs(DiagnosticOptio
bool DefaultDiagColor = true,
bool DefaultShowOpt = true);
-class CompilerInvocationBase : public RefCountedBase<CompilerInvocation> {
+class CompilerInvocationBase {
void operator=(const CompilerInvocationBase &) = delete;
public:
@@ -65,10 +65,10 @@ public:
IntrusiveRefCntPtr<DiagnosticOptions> DiagnosticOpts;
/// Options controlling the \#include directive.
- IntrusiveRefCntPtr<HeaderSearchOptions> HeaderSearchOpts;
+ std::shared_ptr<HeaderSearchOptions> HeaderSearchOpts;
/// Options controlling the preprocessor (aside from \#include handling).
- IntrusiveRefCntPtr<PreprocessorOptions> PreprocessorOpts;
+ std::shared_ptr<PreprocessorOptions> PreprocessorOpts;
CompilerInvocationBase();
~CompilerInvocationBase();
@@ -89,7 +89,13 @@ public:
const HeaderSearchOptions &getHeaderSearchOpts() const {
return *HeaderSearchOpts;
}
+ std::shared_ptr<HeaderSearchOptions> getHeaderSearchOptsPtr() const {
+ return HeaderSearchOpts;
+ }
+ std::shared_ptr<PreprocessorOptions> getPreprocessorOptsPtr() {
+ return PreprocessorOpts;
+ }
PreprocessorOptions &getPreprocessorOpts() { return *PreprocessorOpts; }
const PreprocessorOptions &getPreprocessorOpts() const {
return *PreprocessorOpts;
Modified: vendor/clang/dist/include/clang/Frontend/FrontendOptions.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/FrontendOptions.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Frontend/FrontendOptions.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -243,7 +243,7 @@ public:
std::vector<std::string> Plugins;
/// The list of module file extensions.
- std::vector<IntrusiveRefCntPtr<ModuleFileExtension>> ModuleFileExtensions;
+ std::vector<std::shared_ptr<ModuleFileExtension>> ModuleFileExtensions;
/// \brief The list of module map files to load before processing the input.
std::vector<std::string> ModuleMapFiles;
Modified: vendor/clang/dist/include/clang/Frontend/Utils.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/Utils.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Frontend/Utils.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -184,10 +184,10 @@ createChainedIncludesSource(CompilerInst
///
/// \return A CompilerInvocation, or 0 if none was built for the given
/// argument vector.
-CompilerInvocation *
+std::unique_ptr<CompilerInvocation>
createInvocationFromCommandLine(ArrayRef<const char *> Args,
- IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
- IntrusiveRefCntPtr<DiagnosticsEngine>());
+ IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
+ IntrusiveRefCntPtr<DiagnosticsEngine>());
/// Return the value of the last argument as an integer, or a default. If Diags
/// is non-null, emits an error if the argument is given, but non-integral.
Modified: vendor/clang/dist/include/clang/Lex/HeaderSearch.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/HeaderSearch.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Lex/HeaderSearch.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -147,7 +147,7 @@ class HeaderSearch {
};
/// \brief Header-search options used to initialize this header search.
- IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts;
+ std::shared_ptr<HeaderSearchOptions> HSOpts;
DiagnosticsEngine &Diags;
FileManager &FileMgr;
@@ -248,7 +248,7 @@ class HeaderSearch {
friend class DirectoryLookup;
public:
- HeaderSearch(IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts,
+ HeaderSearch(std::shared_ptr<HeaderSearchOptions> HSOpts,
SourceManager &SourceMgr, DiagnosticsEngine &Diags,
const LangOptions &LangOpts, const TargetInfo *Target);
~HeaderSearch();
Modified: vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -44,7 +44,7 @@ namespace frontend {
/// HeaderSearchOptions - Helper class for storing options related to the
/// initialization of the HeaderSearch object.
-class HeaderSearchOptions : public RefCountedBase<HeaderSearchOptions> {
+class HeaderSearchOptions {
public:
struct Entry {
std::string Path;
Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/Preprocessor.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Lex/Preprocessor.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -94,8 +94,8 @@ enum MacroUse {
/// Lexers know only about tokens within a single source file, and don't
/// know anything about preprocessor-level issues like the \#include stack,
/// token expansion, etc.
-class Preprocessor : public RefCountedBase<Preprocessor> {
- IntrusiveRefCntPtr<PreprocessorOptions> PPOpts;
+class Preprocessor {
+ std::shared_ptr<PreprocessorOptions> PPOpts;
DiagnosticsEngine *Diags;
LangOptions &LangOpts;
const TargetInfo *Target;
@@ -650,10 +650,9 @@ class Preprocessor : public RefCountedBa
void updateOutOfDateIdentifier(IdentifierInfo &II) const;
public:
- Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
- DiagnosticsEngine &diags, LangOptions &opts,
- SourceManager &SM, HeaderSearch &Headers,
- ModuleLoader &TheModuleLoader,
+ Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts,
+ DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM,
+ HeaderSearch &Headers, ModuleLoader &TheModuleLoader,
IdentifierInfoLookup *IILookup = nullptr,
bool OwnsHeaderSearch = false,
TranslationUnitKind TUKind = TU_Complete);
Modified: vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -40,7 +40,7 @@ enum ObjCXXARCStandardLibraryKind {
/// PreprocessorOptions - This class is used for passing the various options
/// used in preprocessor initialization to InitializePreprocessor().
-class PreprocessorOptions : public RefCountedBase<PreprocessorOptions> {
+class PreprocessorOptions {
public:
std::vector<std::pair<std::string, bool/*isUndef*/> > Macros;
std::vector<std::string> Includes;
@@ -117,7 +117,7 @@ public:
ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary;
/// \brief Records the set of modules
- class FailedModulesSet : public RefCountedBase<FailedModulesSet> {
+ class FailedModulesSet {
llvm::StringSet<> Failed;
public:
@@ -136,7 +136,7 @@ public:
/// to (re)build modules, so that once a module fails to build anywhere,
/// other instances will see that the module has failed and won't try to
/// build it again.
- IntrusiveRefCntPtr<FailedModulesSet> FailedModules;
+ std::shared_ptr<FailedModulesSet> FailedModules;
public:
PreprocessorOptions() : UsePredefines(true), DetailedRecord(false),
Modified: vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -509,23 +509,18 @@ public:
};
/// \brief Allocator for a cached set of global code completions.
-class GlobalCodeCompletionAllocator
- : public CodeCompletionAllocator,
- public RefCountedBase<GlobalCodeCompletionAllocator>
-{
-
-};
+class GlobalCodeCompletionAllocator : public CodeCompletionAllocator {};
class CodeCompletionTUInfo {
llvm::DenseMap<const DeclContext *, StringRef> ParentNames;
- IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> AllocatorRef;
+ std::shared_ptr<GlobalCodeCompletionAllocator> AllocatorRef;
public:
explicit CodeCompletionTUInfo(
- IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> Allocator)
+ std::shared_ptr<GlobalCodeCompletionAllocator> Allocator)
: AllocatorRef(std::move(Allocator)) {}
- IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> getAllocatorRef() const {
+ std::shared_ptr<GlobalCodeCompletionAllocator> getAllocatorRef() const {
return AllocatorRef;
}
CodeCompletionAllocator &getAllocator() const {
@@ -965,8 +960,8 @@ public:
/// results to the given raw output stream.
PrintingCodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts,
raw_ostream &OS)
- : CodeCompleteConsumer(CodeCompleteOpts, false), OS(OS),
- CCTUInfo(new GlobalCodeCompletionAllocator) {}
+ : CodeCompleteConsumer(CodeCompleteOpts, false), OS(OS),
+ CCTUInfo(std::make_shared<GlobalCodeCompletionAllocator>()) {}
/// \brief Prints the finalized code-completion results.
void ProcessCodeCompleteResults(Sema &S, CodeCompletionContext Context,
Modified: vendor/clang/dist/include/clang/Sema/Ownership.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/Ownership.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Sema/Ownership.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -153,8 +153,8 @@ namespace clang {
ActionResult(const DiagnosticBuilder &) : Val(PtrTy()), Invalid(true) {}
// These two overloads prevent void* -> bool conversions.
- ActionResult(const void *);
- ActionResult(volatile void *);
+ ActionResult(const void *) = delete;
+ ActionResult(volatile void *) = delete;
bool isInvalid() const { return Invalid; }
bool isUsable() const { return !Invalid && Val; }
@@ -192,8 +192,8 @@ namespace clang {
ActionResult(const DiagnosticBuilder &) : PtrWithInvalid(0x01) { }
// These two overloads prevent void* -> bool conversions.
- ActionResult(const void *);
- ActionResult(volatile void *);
+ ActionResult(const void *) = delete;
+ ActionResult(volatile void *) = delete;
bool isInvalid() const { return PtrWithInvalid & 0x01; }
bool isUsable() const { return PtrWithInvalid > 0x01; }
Modified: vendor/clang/dist/include/clang/Sema/Sema.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/Sema.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Sema/Sema.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -6564,6 +6564,10 @@ public:
/// \brief After substituting deduced template arguments, a dependent
/// parameter type did not match the corresponding argument.
TDK_DeducedMismatch,
+ /// \brief After substituting deduced template arguments, an element of
+ /// a dependent parameter type did not match the corresponding element
+ /// of the corresponding argument (when deducing from an initializer list).
+ TDK_DeducedMismatchNested,
/// \brief A non-depnedent component of the parameter did not match the
/// corresponding component of the argument.
TDK_NonDeducedMismatch,
@@ -6602,13 +6606,14 @@ public:
/// brief A function argument from which we performed template argument
// deduction for a call.
struct OriginalCallArg {
- OriginalCallArg(QualType OriginalParamType,
- unsigned ArgIdx,
- QualType OriginalArgType)
- : OriginalParamType(OriginalParamType), ArgIdx(ArgIdx),
- OriginalArgType(OriginalArgType) { }
+ OriginalCallArg(QualType OriginalParamType, bool DecomposedParam,
+ unsigned ArgIdx, QualType OriginalArgType)
+ : OriginalParamType(OriginalParamType),
+ DecomposedParam(DecomposedParam), ArgIdx(ArgIdx),
+ OriginalArgType(OriginalArgType) {}
QualType OriginalParamType;
+ bool DecomposedParam;
unsigned ArgIdx;
QualType OriginalArgType;
};
Modified: vendor/clang/dist/include/clang/Serialization/ASTReader.h
==============================================================================
--- vendor/clang/dist/include/clang/Serialization/ASTReader.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Serialization/ASTReader.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -384,8 +384,8 @@ private:
std::unique_ptr<ASTReaderListener> Listener;
/// \brief The receiver of deserialization events.
- ASTDeserializationListener *DeserializationListener;
- bool OwnsDeserializationListener;
+ ASTDeserializationListener *DeserializationListener = nullptr;
+ bool OwnsDeserializationListener = false;
SourceManager &SourceMgr;
FileManager &FileMgr;
@@ -394,7 +394,7 @@ private:
/// \brief The semantic analysis object that will be processing the
/// AST files and the translation unit that uses it.
- Sema *SemaObj;
+ Sema *SemaObj = nullptr;
/// \brief The preprocessor that will be loading the source file.
Preprocessor &PP;
@@ -403,7 +403,7 @@ private:
ASTContext &Context;
/// \brief The AST consumer.
- ASTConsumer *Consumer;
+ ASTConsumer *Consumer = nullptr;
/// \brief The module manager which manages modules and their dependencies
ModuleManager ModuleMgr;
@@ -414,7 +414,7 @@ private:
IdentifierResolver DummyIdResolver;
/// A mapping from extension block names to module file extensions.
- llvm::StringMap<IntrusiveRefCntPtr<ModuleFileExtension>> ModuleFileExtensions;
+ llvm::StringMap<std::shared_ptr<ModuleFileExtension>> ModuleFileExtensions;
/// \brief A timer used to track the time spent deserializing.
std::unique_ptr<llvm::Timer> ReadTimer;
@@ -802,10 +802,10 @@ private:
SourceLocation OptimizeOffPragmaLocation;
/// \brief The PragmaMSStructKind pragma ms_struct state if set, or -1.
- int PragmaMSStructState;
+ int PragmaMSStructState = -1;
/// \brief The PragmaMSPointersToMembersKind pragma pointers_to_members state.
- int PragmaMSPointersToMembersState;
+ int PragmaMSPointersToMembersState = -1;
SourceLocation PointersToMembersPragmaLocation;
/// \brief The OpenCL extension settings.
@@ -870,10 +870,10 @@ private:
bool UseGlobalIndex;
/// \brief Whether we have tried loading the global module index yet.
- bool TriedLoadingGlobalIndex;
+ bool TriedLoadingGlobalIndex = false;
///\brief Whether we are currently processing update records.
- bool ProcessingUpdateRecords;
+ bool ProcessingUpdateRecords = false;
typedef llvm::DenseMap<unsigned, SwitchCase *> SwitchCaseMapTy;
/// \brief Mapping from switch-case IDs in the chain to switch-case statements
@@ -886,73 +886,73 @@ private:
/// \brief The number of source location entries de-serialized from
/// the PCH file.
- unsigned NumSLocEntriesRead;
+ unsigned NumSLocEntriesRead = 0;
/// \brief The number of source location entries in the chain.
- unsigned TotalNumSLocEntries;
+ unsigned TotalNumSLocEntries = 0;
/// \brief The number of statements (and expressions) de-serialized
/// from the chain.
- unsigned NumStatementsRead;
+ unsigned NumStatementsRead = 0;
/// \brief The total number of statements (and expressions) stored
/// in the chain.
- unsigned TotalNumStatements;
+ unsigned TotalNumStatements = 0;
/// \brief The number of macros de-serialized from the chain.
- unsigned NumMacrosRead;
+ unsigned NumMacrosRead = 0;
/// \brief The total number of macros stored in the chain.
- unsigned TotalNumMacros;
+ unsigned TotalNumMacros = 0;
/// \brief The number of lookups into identifier tables.
- unsigned NumIdentifierLookups;
+ unsigned NumIdentifierLookups = 0;
/// \brief The number of lookups into identifier tables that succeed.
- unsigned NumIdentifierLookupHits;
+ unsigned NumIdentifierLookupHits = 0;
/// \brief The number of selectors that have been read.
- unsigned NumSelectorsRead;
+ unsigned NumSelectorsRead = 0;
/// \brief The number of method pool entries that have been read.
- unsigned NumMethodPoolEntriesRead;
+ unsigned NumMethodPoolEntriesRead = 0;
/// \brief The number of times we have looked up a selector in the method
/// pool.
- unsigned NumMethodPoolLookups;
+ unsigned NumMethodPoolLookups = 0;
/// \brief The number of times we have looked up a selector in the method
/// pool and found something.
- unsigned NumMethodPoolHits;
+ unsigned NumMethodPoolHits = 0;
/// \brief The number of times we have looked up a selector in the method
/// pool within a specific module.
- unsigned NumMethodPoolTableLookups;
+ unsigned NumMethodPoolTableLookups = 0;
/// \brief The number of times we have looked up a selector in the method
/// pool within a specific module and found something.
- unsigned NumMethodPoolTableHits;
+ unsigned NumMethodPoolTableHits = 0;
/// \brief The total number of method pool entries in the selector table.
- unsigned TotalNumMethodPoolEntries;
+ unsigned TotalNumMethodPoolEntries = 0;
/// Number of lexical decl contexts read/total.
- unsigned NumLexicalDeclContextsRead, TotalLexicalDeclContexts;
+ unsigned NumLexicalDeclContextsRead = 0, TotalLexicalDeclContexts = 0;
/// Number of visible decl contexts read/total.
- unsigned NumVisibleDeclContextsRead, TotalVisibleDeclContexts;
+ unsigned NumVisibleDeclContextsRead = 0, TotalVisibleDeclContexts = 0;
/// Total size of modules, in bits, currently loaded
- uint64_t TotalModulesSizeInBits;
+ uint64_t TotalModulesSizeInBits = 0;
/// \brief Number of Decl/types that are currently deserializing.
- unsigned NumCurrentElementsDeserializing;
+ unsigned NumCurrentElementsDeserializing = 0;
/// \brief Set true while we are in the process of passing deserialized
/// "interesting" decls to consumer inside FinishedDeserializing().
/// This is used as a guard to avoid recursively repeating the process of
/// passing decls to consumer.
- bool PassingDeclsToConsumer;
+ bool PassingDeclsToConsumer = false;
/// \brief The set of identifiers that were read while the AST reader was
/// (recursively) loading declarations.
@@ -1055,7 +1055,7 @@ private:
};
/// \brief What kind of records we are reading.
- ReadingKind ReadingKind;
+ ReadingKind ReadingKind = Read_None;
/// \brief RAII object to change the reading kind.
class ReadingKindTracker {
@@ -1366,7 +1366,7 @@ public:
/// deserializing.
ASTReader(Preprocessor &PP, ASTContext &Context,
const PCHContainerReader &PCHContainerRdr,
- ArrayRef<IntrusiveRefCntPtr<ModuleFileExtension>> Extensions,
+ ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
StringRef isysroot = "", bool DisableValidation = false,
bool AllowASTWithCompilerErrors = false,
bool AllowConfigurationMismatch = false,
Modified: vendor/clang/dist/include/clang/Serialization/ASTWriter.h
==============================================================================
--- vendor/clang/dist/include/clang/Serialization/ASTWriter.h Fri Jan 6 20:13:28 2017 (r311533)
+++ vendor/clang/dist/include/clang/Serialization/ASTWriter.h Fri Jan 6 20:13:35 2017 (r311534)
@@ -107,16 +107,16 @@ private:
llvm::BitstreamWriter &Stream;
/// \brief The ASTContext we're writing.
- ASTContext *Context;
+ ASTContext *Context = nullptr;
/// \brief The preprocessor we're writing.
- Preprocessor *PP;
+ Preprocessor *PP = nullptr;
/// \brief The reader of existing AST files, if we're chaining.
- ASTReader *Chain;
+ ASTReader *Chain = nullptr;
/// \brief The module we're currently writing, if any.
- Module *WritingModule;
+ Module *WritingModule = nullptr;
/// \brief The base directory for any relative paths we emit.
std::string BaseDirectory;
@@ -129,14 +129,14 @@ private:
/// \brief Indicates when the AST writing is actively performing
/// serialization, rather than just queueing updates.
- bool WritingAST;
+ bool WritingAST = false;
/// \brief Indicates that we are done serializing the collection of decls
/// and types to emit.
- bool DoneWritingDeclsAndTypes;
+ bool DoneWritingDeclsAndTypes = false;
/// \brief Indicates that the AST contained compiler errors.
- bool ASTHasCompilerErrors;
+ bool ASTHasCompilerErrors = false;
/// \brief Mapping from input file entries to the index into the
/// offset table where information about that input file is stored.
@@ -170,10 +170,10 @@ private:
std::queue<DeclOrType> DeclTypesToEmit;
/// \brief The first ID number we can use for our own declarations.
- serialization::DeclID FirstDeclID;
+ serialization::DeclID FirstDeclID = serialization::NUM_PREDEF_DECL_IDS;
/// \brief The decl ID that will be assigned to the next new decl.
- serialization::DeclID NextDeclID;
+ serialization::DeclID NextDeclID = FirstDeclID;
/// \brief Map that provides the ID numbers of each declaration within
/// the output stream, as well as those deserialized from a chained PCH.
@@ -205,10 +205,10 @@ private:
void associateDeclWithFile(const Decl *D, serialization::DeclID);
/// \brief The first ID number we can use for our own types.
- serialization::TypeID FirstTypeID;
+ serialization::TypeID FirstTypeID = serialization::NUM_PREDEF_TYPE_IDS;
/// \brief The type ID that will be assigned to the next new type.
- serialization::TypeID NextTypeID;
+ serialization::TypeID NextTypeID = FirstTypeID;
/// \brief Map that provides the ID numbers of each type within the
/// output stream, plus those deserialized from a chained PCH.
@@ -226,10 +226,10 @@ private:
std::vector<uint32_t> TypeOffsets;
/// \brief The first ID number we can use for our own identifiers.
- serialization::IdentID FirstIdentID;
+ serialization::IdentID FirstIdentID = serialization::NUM_PREDEF_IDENT_IDS;
/// \brief The identifier ID that will be assigned to the next new identifier.
- serialization::IdentID NextIdentID;
+ serialization::IdentID NextIdentID = FirstIdentID;
/// \brief Map that provides the ID numbers of each identifier in
/// the output stream.
@@ -240,10 +240,10 @@ private:
llvm::MapVector<const IdentifierInfo *, serialization::IdentID> IdentifierIDs;
/// \brief The first ID number we can use for our own macros.
- serialization::MacroID FirstMacroID;
+ serialization::MacroID FirstMacroID = serialization::NUM_PREDEF_MACRO_IDS;
/// \brief The identifier ID that will be assigned to the next new identifier.
- serialization::MacroID NextMacroID;
+ serialization::MacroID NextMacroID = FirstMacroID;
/// \brief Map that provides the ID numbers of each macro.
llvm::DenseMap<MacroInfo *, serialization::MacroID> MacroIDs;
@@ -275,16 +275,18 @@ private:
std::vector<uint32_t> IdentifierOffsets;
/// \brief The first ID number we can use for our own submodules.
- serialization::SubmoduleID FirstSubmoduleID;
-
+ serialization::SubmoduleID FirstSubmoduleID =
+ serialization::NUM_PREDEF_SUBMODULE_IDS;
+
/// \brief The submodule ID that will be assigned to the next new submodule.
- serialization::SubmoduleID NextSubmoduleID;
+ serialization::SubmoduleID NextSubmoduleID = FirstSubmoduleID;
/// \brief The first ID number we can use for our own selectors.
- serialization::SelectorID FirstSelectorID;
+ serialization::SelectorID FirstSelectorID =
+ serialization::NUM_PREDEF_SELECTOR_IDS;
/// \brief The selector ID that will be assigned to the next new selector.
- serialization::SelectorID NextSelectorID;
+ serialization::SelectorID NextSelectorID = FirstSelectorID;
/// \brief Map that provides the ID numbers of each Selector.
llvm::MapVector<Selector, serialization::SelectorID> SelectorIDs;
@@ -394,18 +396,18 @@ private:
llvm::DenseMap<SwitchCase *, unsigned> SwitchCaseIDs;
/// \brief The number of statements written to the AST file.
- unsigned NumStatements;
+ unsigned NumStatements = 0;
/// \brief The number of macros written to the AST file.
- unsigned NumMacros;
+ unsigned NumMacros = 0;
/// \brief The number of lexical declcontexts written to the AST
/// file.
- unsigned NumLexicalDeclContexts;
+ unsigned NumLexicalDeclContexts = 0;
/// \brief The number of visible declcontexts written to the AST
/// file.
- unsigned NumVisibleDeclContexts;
+ unsigned NumVisibleDeclContexts = 0;
/// \brief A mapping from each known submodule to its ID number, which will
/// be a positive integer.
@@ -436,8 +438,8 @@ private:
void WritePragmaDiagnosticMappings(const DiagnosticsEngine &Diag,
bool isModule);
- unsigned TypeExtQualAbbrev;
- unsigned TypeFunctionProtoAbbrev;
+ unsigned TypeExtQualAbbrev = 0;
+ unsigned TypeFunctionProtoAbbrev = 0;
void WriteTypeAbbrevs();
void WriteType(QualType T);
@@ -470,22 +472,22 @@ private:
void WriteModuleFileExtension(Sema &SemaRef,
ModuleFileExtensionWriter &Writer);
- unsigned DeclParmVarAbbrev;
- unsigned DeclContextLexicalAbbrev;
- unsigned DeclContextVisibleLookupAbbrev;
- unsigned UpdateVisibleAbbrev;
- unsigned DeclRecordAbbrev;
- unsigned DeclTypedefAbbrev;
- unsigned DeclVarAbbrev;
- unsigned DeclFieldAbbrev;
- unsigned DeclEnumAbbrev;
- unsigned DeclObjCIvarAbbrev;
- unsigned DeclCXXMethodAbbrev;
-
- unsigned DeclRefExprAbbrev;
- unsigned CharacterLiteralAbbrev;
- unsigned IntegerLiteralAbbrev;
- unsigned ExprImplicitCastAbbrev;
+ unsigned DeclParmVarAbbrev = 0;
+ unsigned DeclContextLexicalAbbrev = 0;
+ unsigned DeclContextVisibleLookupAbbrev = 0;
+ unsigned UpdateVisibleAbbrev = 0;
+ unsigned DeclRecordAbbrev = 0;
+ unsigned DeclTypedefAbbrev = 0;
+ unsigned DeclVarAbbrev = 0;
+ unsigned DeclFieldAbbrev = 0;
+ unsigned DeclEnumAbbrev = 0;
+ unsigned DeclObjCIvarAbbrev = 0;
+ unsigned DeclCXXMethodAbbrev = 0;
+
+ unsigned DeclRefExprAbbrev = 0;
+ unsigned CharacterLiteralAbbrev = 0;
+ unsigned IntegerLiteralAbbrev = 0;
+ unsigned ExprImplicitCastAbbrev = 0;
void WriteDeclAbbrevs();
void WriteDecl(ASTContext &Context, Decl *D);
@@ -498,7 +500,7 @@ public:
/// \brief Create a new precompiled header writer that outputs to
/// the given bitstream.
ASTWriter(llvm::BitstreamWriter &Stream,
- ArrayRef<llvm::IntrusiveRefCntPtr<ModuleFileExtension>> Extensions,
+ ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
bool IncludeTimestamps = true);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list