aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Object
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-12 20:21:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-12 20:21:39 +0000
commit34ac52d9377b104c83f80184f284199d68732f07 (patch)
tree90a9245e96c8cc8e429b785d6e13fef59f35c779 /include/llvm/Object
parent795740b591331a0caf342edc4d572ec348415b40 (diff)
downloadexternal_llvm-34ac52d9377b104c83f80184f284199d68732f07.zip
external_llvm-34ac52d9377b104c83f80184f284199d68732f07.tar.gz
external_llvm-34ac52d9377b104c83f80184f284199d68732f07.tar.bz2
Change llvm-ar to use lib/Object.
This fixes two bugs is lib/Object that the use in llvm-ar found: * In OS X created archives, the name can be padded with nulls. Strip them. * In the constructor, remember the first non special member and use that in begin_children. This makes sure we skip all special members, not just the first one. The change to llvm-ar itself consist of * Using lib/Object for reading archives instead of ArchiveReader.cpp. * Writing the modified archive directly, instead of creating an in memory representation. The old Archive library was way more general than what is needed, as can be seen by the diffstat of this patch. Having llvm-ar using lib/Object now opens the way for creating regular symbol tables for both native objects and bitcode files so that we can use those archives for LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object')
-rw-r--r--include/llvm/Object/Archive.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h
index 0be0c15..c0513a7 100644
--- a/include/llvm/Object/Archive.h
+++ b/include/llvm/Object/Archive.h
@@ -174,7 +174,7 @@ public:
return Format;
}
- child_iterator begin_children(bool skip_internal = true) const;
+ child_iterator begin_children(bool SkipInternal = true) const;
child_iterator end_children() const;
symbol_iterator begin_symbols() const;
@@ -191,6 +191,7 @@ public:
private:
child_iterator SymbolTable;
child_iterator StringTable;
+ child_iterator FirstRegular;
Kind Format;
};