Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: src/IceELFObjectWriter.cpp

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceELFObjectWriter.cpp
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp
index 37b1d58acdf274fc727997e4867a685902417f1f..30493a45a00ac196ac0585bfef475bb8a4be9a0f 100644
--- a/src/IceELFObjectWriter.cpp
+++ b/src/IceELFObjectWriter.cpp
@@ -21,7 +21,12 @@
#include "IceGlobalContext.h"
#include "IceGlobalInits.h"
#include "IceOperand.h"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-parameter"
+#pragma clang diagnostic ignored "-Wshadow"
#include "llvm/Support/MathExtras.h"
+#pragma clang diagnostic pop
using namespace llvm::ELF;
@@ -64,8 +69,8 @@ uint32_t getELFFlags(TargetArch Arch) {
} // end of anonymous namespace
-ELFObjectWriter::ELFObjectWriter(GlobalContext &Ctx, ELFStreamer &Out)
- : Ctx(Ctx), Str(Out), ELF64(isELF64(Ctx.getFlags().getTargetArch())) {
+ELFObjectWriter::ELFObjectWriter(GlobalContext &MyCtx, ELFStreamer &Out)
+ : Ctx(MyCtx), Str(Out), ELF64(isELF64(Ctx.getFlags().getTargetArch())) {
// Create the special bookkeeping sections now.
const IceString NullSectionName("");
NullSection = new (Ctx.allocate<ELFSection>())
@@ -317,7 +322,6 @@ void ELFObjectWriter::writeDataOfType(SectionType ST,
return;
ELFDataSection *Section;
ELFRelocationSection *RelSection;
- IceString SectionName;
Elf64_Xword ShAddralign = 1;
for (VariableDeclaration *Var : Vars) {
Elf64_Xword Align = Var->getAlignment();

Powered by Google App Engine
This is Rietveld 408576698