[lld] r186368 - [PECOFF] Add default argument to addDir32NBReloc() as the default value 0 is reasonable.
Rui Ueyama
ruiu at google.com
Mon Jul 15 17:03:51 PDT 2013
Author: ruiu
Date: Mon Jul 15 19:03:51 2013
New Revision: 186368
URL: http://llvm.org/viewvc/llvm-project?rev=186368&view=rev
Log:
[PECOFF] Add default argument to addDir32NBReloc() as the default value 0 is reasonable.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h
Modified: lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h?rev=186368&r1=186367&r2=186368&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h Mon Jul 15 19:03:51 2013
@@ -51,7 +51,7 @@ class HintNameAtom;
class ImportTableEntryAtom;
void addDir32NBReloc(COFFBaseDefinedAtom *atom, const Atom *target,
- size_t offsetInAtom) {
+ size_t offsetInAtom = 0) {
atom->addReference(std::unique_ptr<COFFReference>(new COFFReference(
target, offsetInAtom, llvm::COFF::IMAGE_REL_I386_DIR32NB)));
}
@@ -197,7 +197,7 @@ private:
for (COFFSharedLibraryAtom *shared : sharedAtoms) {
HintNameAtom *hintName = createHintNameAtom(ctx, shared);
ImportTableEntryAtom *entry = new (_alloc) ImportTableEntryAtom(ctx);
- addDir32NBReloc(entry, hintName, 0);
+ addDir32NBReloc(entry, hintName);
ret.push_back(entry);
if (shouldAddReference)
shared->setImportTableEntry(entry);
@@ -281,11 +281,11 @@ private:
/// will be set by the writer.
void createDataDirectoryAtoms(Context &ctx) {
auto *dir = new (_alloc) coff::COFFDataDirectoryAtom(ctx.file, 1);
- addDir32NBReloc(dir, ctx.importDirectories[0], 0);
+ addDir32NBReloc(dir, ctx.importDirectories[0]);
ctx.file.addAtom(*dir);
auto *iat = new (_alloc) coff::COFFDataDirectoryAtom(ctx.file, 12);
- addDir32NBReloc(iat, ctx.importAddressTables[0], 0);
+ addDir32NBReloc(iat, ctx.importAddressTables[0]);
ctx.file.addAtom(*iat);
}
More information about the llvm-commits
mailing list