summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/MSF/MsfCommon.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-07-29 18:38:47 +0000
committerZachary Turner <zturner@google.com>2016-07-29 18:38:47 +0000
commit334aec4dd2de892d081d1aaa0ac54864da43dd58 (patch)
tree3846e17b7b6fa26c5f6d461a69d701f6afb1829a /llvm/lib/DebugInfo/MSF/MsfCommon.cpp
parent1e4426e786451e1972be014c3b974eb961391af7 (diff)
downloadbcm5719-llvm-334aec4dd2de892d081d1aaa0ac54864da43dd58.tar.gz
bcm5719-llvm-334aec4dd2de892d081d1aaa0ac54864da43dd58.zip
Revert "[msf] Rename Msf to MSF."
This reverts commit 4d1557ffac41e079bcb1abbcf04f512474dcd6fe. llvm-svn: 277194
Diffstat (limited to 'llvm/lib/DebugInfo/MSF/MsfCommon.cpp')
-rw-r--r--llvm/lib/DebugInfo/MSF/MsfCommon.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/llvm/lib/DebugInfo/MSF/MsfCommon.cpp b/llvm/lib/DebugInfo/MSF/MsfCommon.cpp
deleted file mode 100644
index d79ccafe898..00000000000
--- a/llvm/lib/DebugInfo/MSF/MsfCommon.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//===- MSFCommon.cpp - Common types and functions for MSF files -*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/DebugInfo/MSF/MSFCommon.h"
-#include "llvm/DebugInfo/MSF/MSFError.h"
-
-using namespace llvm;
-using namespace llvm::msf;
-
-Error llvm::msf::validateSuperBlock(const SuperBlock &SB) {
- // Check the magic bytes.
- if (std::memcmp(SB.MagicBytes, Magic, sizeof(Magic)) != 0)
- return make_error<MSFError>(msf_error_code::invalid_format,
- "MSF magic header doesn't match");
-
- if (!isValidBlockSize(SB.BlockSize))
- return make_error<MSFError>(msf_error_code::invalid_format,
- "Unsupported block size.");
-
- // We don't support directories whose sizes aren't a multiple of four bytes.
- if (SB.NumDirectoryBytes % sizeof(support::ulittle32_t) != 0)
- return make_error<MSFError>(msf_error_code::invalid_format,
- "Directory size is not multiple of 4.");
-
- // The number of blocks which comprise the directory is a simple function of
- // the number of bytes it contains.
- uint64_t NumDirectoryBlocks =
- bytesToBlocks(SB.NumDirectoryBytes, SB.BlockSize);
-
- // The directory, as we understand it, is a block which consists of a list of
- // block numbers. It is unclear what would happen if the number of blocks
- // couldn't fit on a single block.
- if (NumDirectoryBlocks > SB.BlockSize / sizeof(support::ulittle32_t))
- return make_error<MSFError>(msf_error_code::invalid_format,
- "Too many directory blocks.");
-
- if (SB.BlockMapAddr == 0)
- return make_error<MSFError>(msf_error_code::invalid_format,
- "Block 0 is reserved");
-
- return Error::success();
-}
OpenPOWER on IntegriCloud