summaryrefslogtreecommitdiffstats
path: root/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2018-06-08 02:45:25 +0000
committerAaron Smith <aaron.smith@microsoft.com>2018-06-08 02:45:25 +0000
commit010edd37f82270a71129a6cea30d01722c0ead35 (patch)
treed9050177d5fe421db2a582c43734ace487e7c630 /lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
parente535c144529d6a19d9522aa45c77628b487d8898 (diff)
downloadbcm5719-llvm-010edd37f82270a71129a6cea30d01722c0ead35.tar.gz
bcm5719-llvm-010edd37f82270a71129a6cea30d01722c0ead35.zip
PDB support of function-level linking and splitted functions
Summary: The patch adds support of splitted functions (when MSVC is used with PGO) and function-level linking feature. SymbolFilePDB::ParseCompileUnitLineTable function relies on fact that ranges of compiled source files in the binary are continuous and don't intersect each other. The function creates LineSequence for each file and inserts it into LineTable, and implementation of last one relies on continuity of the sequence. But it's not always true when function-level linking enabled, e.g. in added input test file test-pdb-function-level-linking.exe there is xstring's std__basic_string_char_std__char_traits_char__std__allocator_char_____max_size (.00454820) between test-pdb-function-level-linking.cpp's foo (.00454770) and main (.004548F0). To fix the problem this patch renews the sequence on each address gap. Reviewers: asmith, zturner Reviewed By: asmith Subscribers: aleksandr.urakov, labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D47708 llvm-svn: 334260
Diffstat (limited to 'lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp')
-rw-r--r--lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp b/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
new file mode 100644
index 00000000000..fa0030bacbf
--- /dev/null
+++ b/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
@@ -0,0 +1,9 @@
+#include "FunctionLevelLinkingTest.h"
+
+int foo() {
+ return 0;
+}
+
+int main() {
+ return foo() + bar() + baz();
+}
OpenPOWER on IntegriCloud