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

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: Change the previous underscore naming style Created 5 years, 6 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 eca340312a101edb9275a054a2b2d915d1e0c9f4..1a8d335ef14087cd680396143b081f0eb4deb9cc 100644
--- a/src/IceELFObjectWriter.cpp
+++ b/src/IceELFObjectWriter.cpp
@@ -20,7 +20,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;
@@ -63,8 +68,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>())
@@ -316,7 +321,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