[lld] r194128 - Undef a local macro after use.
Rui Ueyama
ruiu at google.com
Tue Nov 5 20:47:19 PST 2013
Author: ruiu
Date: Tue Nov 5 22:47:19 2013
New Revision: 194128
URL: http://llvm.org/viewvc/llvm-project?rev=194128&view=rev
Log:
Undef a local macro after use.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp?rev=194128&r1=194127&r2=194128&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp Tue Nov 5 22:47:19 2013
@@ -174,34 +174,33 @@ StringRef PECOFFLinkingContext::searchLi
Writer &PECOFFLinkingContext::writer() const { return *_writer; }
-#define LLD_CASE(name) .Case(#name, llvm::COFF::name)
-
ErrorOr<Reference::Kind>
PECOFFLinkingContext::relocKindFromString(StringRef str) const {
+#define LLD_CASE(name) .Case(#name, llvm::COFF::name)
int32_t ret = llvm::StringSwitch<int32_t>(str)
LLD_CASE(IMAGE_REL_I386_ABSOLUTE)
LLD_CASE(IMAGE_REL_I386_DIR32)
LLD_CASE(IMAGE_REL_I386_DIR32NB)
LLD_CASE(IMAGE_REL_I386_REL32)
.Default(-1);
+#undef LLD_CASE
if (ret == -1)
return make_error_code(YamlReaderError::illegal_value);
return ret;
}
-#undef LLD_CASE
-
-#define LLD_CASE(name) \
- case llvm::COFF::name: \
- return std::string(#name);
-
ErrorOr<std::string>
PECOFFLinkingContext::stringFromRelocKind(Reference::Kind kind) const {
switch (kind) {
+#define LLD_CASE(name) \
+ case llvm::COFF::name: \
+ return std::string(#name);
+
LLD_CASE(IMAGE_REL_I386_ABSOLUTE)
LLD_CASE(IMAGE_REL_I386_DIR32)
LLD_CASE(IMAGE_REL_I386_DIR32NB)
LLD_CASE(IMAGE_REL_I386_REL32)
+#undef LLD_CASE
}
return make_error_code(YamlReaderError::illegal_value);
}
More information about the llvm-commits
mailing list