Update prebuilt Clang to r365631c1 from Android.
The version we had was segfaulting.
Bug: 132420445
Change-Id: Icb45a6fe0b4e2166f7895e669df1157cec9fb4e0
diff --git a/linux-x64/clang/include/llvm/DebugInfo/Symbolize/Symbolize.h b/linux-x64/clang/include/llvm/DebugInfo/Symbolize/Symbolize.h
index 4e57fe4..d3da28c 100644
--- a/linux-x64/clang/include/llvm/DebugInfo/Symbolize/Symbolize.h
+++ b/linux-x64/clang/include/llvm/DebugInfo/Symbolize/Symbolize.h
@@ -35,38 +35,35 @@
class LLVMSymbolizer {
public:
struct Options {
- FunctionNameKind PrintFunctions;
- bool UseSymbolTable : 1;
- bool Demangle : 1;
- bool RelativeAddresses : 1;
+ FunctionNameKind PrintFunctions = FunctionNameKind::LinkageName;
+ bool UseSymbolTable = true;
+ bool Demangle = true;
+ bool RelativeAddresses = false;
std::string DefaultArch;
std::vector<std::string> DsymHints;
std::string FallbackDebugPath;
-
- Options(FunctionNameKind PrintFunctions = FunctionNameKind::LinkageName,
- bool UseSymbolTable = true, bool Demangle = true,
- bool RelativeAddresses = false, std::string DefaultArch = "",
- std::string FallbackDebugPath = "")
- : PrintFunctions(PrintFunctions), UseSymbolTable(UseSymbolTable),
- Demangle(Demangle), RelativeAddresses(RelativeAddresses),
- DefaultArch(std::move(DefaultArch)),
- FallbackDebugPath(std::move(FallbackDebugPath)) {}
+ std::string DWPName;
};
- LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}
+ LLVMSymbolizer() = default;
+ LLVMSymbolizer(const Options &Opts) : Opts(Opts) {}
~LLVMSymbolizer() {
flush();
}
+ Expected<DILineInfo> symbolizeCode(const ObjectFile &Obj,
+ object::SectionedAddress ModuleOffset);
Expected<DILineInfo> symbolizeCode(const std::string &ModuleName,
- uint64_t ModuleOffset,
- StringRef DWPName = "");
- Expected<DIInliningInfo> symbolizeInlinedCode(const std::string &ModuleName,
- uint64_t ModuleOffset,
- StringRef DWPName = "");
+ object::SectionedAddress ModuleOffset);
+ Expected<DIInliningInfo>
+ symbolizeInlinedCode(const std::string &ModuleName,
+ object::SectionedAddress ModuleOffset);
Expected<DIGlobal> symbolizeData(const std::string &ModuleName,
- uint64_t ModuleOffset);
+ object::SectionedAddress ModuleOffset);
+ Expected<std::vector<DILocal>>
+ symbolizeFrame(const std::string &ModuleName,
+ object::SectionedAddress ModuleOffset);
void flush();
static std::string
@@ -76,14 +73,23 @@
private:
// Bundles together object file with code/data and object file with
// corresponding debug info. These objects can be the same.
- using ObjectPair = std::pair<ObjectFile *, ObjectFile *>;
+ using ObjectPair = std::pair<const ObjectFile *, const ObjectFile *>;
+
+ Expected<DILineInfo>
+ symbolizeCodeCommon(SymbolizableModule *Info,
+ object::SectionedAddress ModuleOffset);
/// Returns a SymbolizableModule or an error if loading debug info failed.
/// Only one attempt is made to load a module, and errors during loading are
/// only reported once. Subsequent calls to get module info for a module that
/// failed to load will return nullptr.
Expected<SymbolizableModule *>
- getOrCreateModuleInfo(const std::string &ModuleName, StringRef DWPName = "");
+ getOrCreateModuleInfo(const std::string &ModuleName);
+
+ Expected<SymbolizableModule *>
+ createModuleInfo(const ObjectFile *Obj,
+ std::unique_ptr<DIContext> Context,
+ StringRef ModuleName);
ObjectFile *lookUpDsymFile(const std::string &Path,
const MachOObjectFile *ExeObj,