Update clang to r339409.
Change-Id: I800772d2d838223be1f6b40d490c4591b937fca2
diff --git a/linux-x64/clang/include/llvm/MC/MCContext.h b/linux-x64/clang/include/llvm/MC/MCContext.h
index c110ffd..a712e2d 100644
--- a/linux-x64/clang/include/llvm/MC/MCContext.h
+++ b/linux-x64/clang/include/llvm/MC/MCContext.h
@@ -137,6 +137,9 @@
/// The compilation directory to use for DW_AT_comp_dir.
SmallString<128> CompilationDir;
+ /// Prefix replacement map for source file information.
+ std::map<const std::string, const std::string> DebugPrefixMap;
+
/// The main file name if passed in explicitly.
std::string MainFileName;
@@ -272,7 +275,7 @@
unsigned UniqueID,
const MCSymbolELF *Associated);
- /// \brief Map of currently defined macros.
+ /// Map of currently defined macros.
StringMap<MCAsmMacro> MacroMap;
public:
@@ -295,6 +298,10 @@
CodeViewContext &getCVContext();
+ /// Clear the current cv_loc, if there is one. Avoids lazily creating a
+ /// CodeViewContext if none is needed.
+ void clearCVLocSeen();
+
void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; }
@@ -338,7 +345,7 @@
/// Gets a symbol that will be defined to the final stack offset of a local
/// variable after codegen.
///
- /// \param Idx - The index of a local variable passed to @llvm.localescape.
+ /// \param Idx - The index of a local variable passed to \@llvm.localescape.
MCSymbol *getOrCreateFrameAllocSymbol(StringRef FuncName, unsigned Idx);
MCSymbol *getOrCreateParentFrameOffsetSymbol(StringRef FuncName);
@@ -478,20 +485,32 @@
/// \name Dwarf Management
/// @{
- /// \brief Get the compilation directory for DW_AT_comp_dir
+ /// Get the compilation directory for DW_AT_comp_dir
/// The compilation directory should be set with \c setCompilationDir before
/// calling this function. If it is unset, an empty string will be returned.
StringRef getCompilationDir() const { return CompilationDir; }
- /// \brief Set the compilation directory for DW_AT_comp_dir
+ /// Set the compilation directory for DW_AT_comp_dir
void setCompilationDir(StringRef S) { CompilationDir = S.str(); }
- /// \brief Get the main file name for use in error messages and debug
+ /// Get the debug prefix map.
+ const std::map<const std::string, const std::string> &
+ getDebugPrefixMap() const {
+ return DebugPrefixMap;
+ }
+
+ /// Add an entry to the debug prefix map.
+ void addDebugPrefixMapEntry(const std::string &From, const std::string &To);
+
+ // Remaps all debug directory paths in-place as per the debug prefix map.
+ void RemapDebugPaths();
+
+ /// Get the main file name for use in error messages and debug
/// info. This can be set to ensure we've got the correct file name
/// after preprocessing or for -save-temps.
const std::string &getMainFileName() const { return MainFileName; }
- /// \brief Set the main file name and override the default.
+ /// Set the main file name and override the default.
void setMainFileName(StringRef S) { MainFileName = S; }
/// Creates an entry in the dwarf file and directory tables.
@@ -546,6 +565,11 @@
Source);
}
+ /// Reports whether MD5 checksum usage is consistent (all-or-none).
+ bool isDwarfMD5UsageConsistent(unsigned CUID) const {
+ return getMCDwarfLineTable(CUID).isMD5UsageConsistent();
+ }
+
/// Saves the information from the currently parsed dwarf .loc directive
/// and sets DwarfLocSeen. When the next instruction is assembled an entry
/// in the line number table with this information and the address of the
@@ -649,7 +673,7 @@
// operator new and delete aren't allowed inside namespaces.
// The throw specifications are mandated by the standard.
-/// \brief Placement new for using the MCContext's allocator.
+/// Placement new for using the MCContext's allocator.
///
/// This placement form of operator new uses the MCContext's allocator for
/// obtaining memory. It is a non-throwing new, which means that it returns
@@ -675,7 +699,7 @@
size_t Alignment = 8) noexcept {
return C.allocate(Bytes, Alignment);
}
-/// \brief Placement delete companion to the new above.
+/// Placement delete companion to the new above.
///
/// This operator is just a companion to the new above. There is no way of
/// invoking it directly; see the new operator for more details. This operator
@@ -709,7 +733,7 @@
return C.allocate(Bytes, Alignment);
}
-/// \brief Placement delete[] companion to the new[] above.
+/// Placement delete[] companion to the new[] above.
///
/// This operator is just a companion to the new[] above. There is no way of
/// invoking it directly; see the new[] operator for more details. This operator