Summary: See http://lists.llvm.org/pipermail/llvm-dev/2015-October/091624.html
Reviewers: echristo
Subscribers: llvm-commits, aizatsky
Differential Revision: http://reviews.llvm.org/D13998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251316
91177308-0d34-0410-b5e6-
96231b3b80d8
-//===-- LLVMSymbolize.h ----------------------------------------- C++ -----===//
+//===-- Symbolize.h --------------------------------------------- C++ -----===//
//
// The LLVM Compiler Infrastructure
//
// Header for LLVM symbolization library.
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_TOOLS_LLVM_SYMBOLIZER_LLVMSYMBOLIZE_H
-#define LLVM_TOOLS_LLVM_SYMBOLIZER_LLVMSYMBOLIZE_H
+#ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H
+#define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H
#include "llvm/ADT/SmallVector.h"
#include "llvm/DebugInfo/DIContext.h"
#include <string>
namespace llvm {
-
-typedef DILineInfoSpecifier::FunctionNameKind FunctionNameKind;
-using namespace object;
-
namespace symbolize {
+using namespace object;
+using FunctionNameKind = DILineInfoSpecifier::FunctionNameKind;
class ModuleInfo;
class LLVMSymbolizer {
-
add_subdirectory(DWARF)
add_subdirectory(PDB)
-
+add_subdirectory(Symbolize)
;===------------------------------------------------------------------------===;
[common]
-subdirectories = DWARF PDB
+subdirectories = DWARF PDB Symbolize
[component_0]
type = Group
include $(LEVEL)/Makefile.config
-PARALLEL_DIRS := DWARF PDB
+PARALLEL_DIRS := DWARF PDB Symbolize
-include $(LEVEL)/Makefile.common
\ No newline at end of file
+include $(LEVEL)/Makefile.common
--- /dev/null
+add_llvm_library(LLVMSymbolize
+ Symbolize.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/Symbolize
+ )
--- /dev/null
+;===- ./lib/DebugInfo/Symbolize/LLVMBuild.txt ------------------*- Conf -*--===;
+;
+; The LLVM Compiler Infrastructure
+;
+; This file is distributed under the University of Illinois Open Source
+; License. See LICENSE.TXT for details.
+;
+;===------------------------------------------------------------------------===;
+;
+; This is an LLVMBuild description file for the components in this subdirectory.
+;
+; For more information on the LLVMBuild system, please see:
+;
+; http://llvm.org/docs/LLVMBuild.html
+;
+;===------------------------------------------------------------------------===;
+
+[component_0]
+type = Library
+name = Symbolize
+parent = DebugInfo
+required_libraries = DebugInfoDWARF DebugInfoPDB Object Support
--- /dev/null
+##===- lib/DebugInfo/Symbolize/Makefile --------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../../..
+LIBRARYNAME = LLVMSymbolize
+BUILD_ARCHIVE := 1
+
+include $(LEVEL)/Makefile.common
+
//
//===----------------------------------------------------------------------===//
-#include "LLVMSymbolize.h"
+#include "llvm/DebugInfo/Symbolize/Symbolize.h"
+
#include "llvm/ADT/STLExtras.h"
#include "llvm/Config/config.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
namespace llvm {
namespace symbolize {
+// FIXME: Move this to llvm-symbolizer tool.
static bool error(std::error_code ec) {
if (!ec)
return false;
DebugInfoPDB
Object
Support
+ Symbolize
)
add_llvm_tool(llvm-symbolizer
- LLVMSymbolize.cpp
llvm-symbolizer.cpp
)
LEVEL := ../..
TOOLNAME := llvm-symbolizer
-LINK_COMPONENTS := DebugInfoDWARF DebugInfoPDB Object
+LINK_COMPONENTS := DebugInfoDWARF DebugInfoPDB Object Support Symbolize
# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS := 1
//
//===----------------------------------------------------------------------===//
-#include "LLVMSymbolize.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Support/COM.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"