Commit abe8c155 authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

klocwork issue (#2098)

parent 6dfde1b6
......@@ -267,6 +267,10 @@ void pass::MemoryManager::dump(ostream& out)
size_t pass::MemoryManager::align(size_t size, size_t alignment)
{
if (alignment == 0)
{
throw invalid_argument("alignment must be > 0");
}
if (size == 0)
{
size = alignment;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment