Add missing uint32 type to folly::ProgramOptions::gFlagAdders
[folly.git] / folly / experimental / symbolizer / Elf-inl.h
index cc4f51bd1cae72283f3afda0744ed941ee35ddb0..e643dd2fc3c72fbcc51a1ec5bc26548e014bc9af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,8 +62,8 @@ const char* ElfFile::iterateStrings(const ElfW(Shdr)& stringTable, Fn fn)
 template <class Fn>
 const ElfW(Sym)* ElfFile::iterateSymbols(const ElfW(Shdr)& section, Fn fn)
   const {
-  enforce(section.sh_entsize == sizeof(ElfW(Sym)),
-          "invalid entry size in symbol table");
+  FOLLY_SAFE_CHECK(section.sh_entsize == sizeof(ElfW(Sym)),
+                   "invalid entry size in symbol table");
 
   const ElfW(Sym)* sym = &at<ElfW(Sym)>(section.sh_offset);
   const ElfW(Sym)* end = sym + (section.sh_size / section.sh_entsize);
@@ -90,4 +90,3 @@ const ElfW(Sym)* ElfFile::iterateSymbolsWithType(const ElfW(Shdr)& section,
 
 }  // namespace symbolizer
 }  // namespace folly
-