Skip to content

Commit

Permalink
Fix line endings, trailing whitespace, file endings via pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Aug 4, 2022
1 parent 3329c1a commit 2b736ff
Show file tree
Hide file tree
Showing 73 changed files with 1,699 additions and 1,683 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,3 @@ Standard: Cpp11
TabWidth: 4
UseTab: Never
...

2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Checks: >
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
-performance-no-int-to-ptr,
-portability-simd-intrinsics
-portability-simd-intrinsics
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ compile_commands.json
CMakeSettings.json
_skbuild/
*.egg-info/
__pycache__/
__pycache__/
2 changes: 1 addition & 1 deletion cmake/gitversion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ else()
message(STATUS "git not found")
endif()

configure_file(${infile} ${outfile} @ONLY)
configure_file(${infile} ${outfile} @ONLY)
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ parsers:
comment:
layout: "reach, diff, flags, files, footer"
behavior: default
require_changes: no
require_changes: no
2 changes: 1 addition & 1 deletion docs/api-reference.dox
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ syntax node without necessarily compiling the whole design.
- The @ref slang::ScriptSession is a high level code interpreter; you can give it some source
code and it will return a constant value that is the result of executing that code.

*/
*/
2 changes: 1 addition & 1 deletion docs/command-line-ref.dox
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ The default is 10.

Attempt to increase compatibility with the specified tool. Various options will
be set and warnings will be silenced to mimic the given tool as closely as possible.
Currently only 'vcs' is supported as a value.
Currently only 'vcs' is supported as a value.

`-T,--timing min|typ|max`

Expand Down
2 changes: 1 addition & 1 deletion docs/common-components.dox
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ allocate their first few elements on the stack to try to avoid heap allocations.
- For any hash tables that do need to live outside the stack, flat_hash_map
should be used over std::unordered_map, always.

*/
*/
2 changes: 1 addition & 1 deletion docs/developer-guide.dox
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ and serves as a starting point for learning to use it in your own projects.
- @ref diagnostics - APIs that support issuing diagnostics
- @ref parsing - APIs for parsing SystemVerilog source code

*/
*/
3,050 changes: 1,525 additions & 1,525 deletions docs/grammar.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/namespaces.dox
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@

/** @namespace slang
@brief Root namespace
*/
*/
2 changes: 1 addition & 1 deletion external/ieee1800/sv_vpi_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,4 +525,4 @@ vpiHandle vpi_register_assertion_cb(vpiHandle assertion, /* handle to assertion
}
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion external/ieee1800/svdpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,4 +453,4 @@ XXTERN void svGetLogicArrElem3Vec32(svLogicVec32* d, const svOpenArrayHandle s,
}
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion external/ieee1800/vpi_compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ directly."
# define vpi_put_value vpi_put_value_1800v2012
# define vpi_register_cb vpi_register_cb_1800v2012
# define vpi_scan vpi_scan_1800v2012
#endif
#endif
2 changes: 1 addition & 1 deletion external/ieee1800/vpi_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -945,4 +945,4 @@ PLI_VEXTERN PLI_DLLESPEC void (*vlog_startup_routines[])(void);
}
#endif

#endif /* VPI_USER_H */
#endif /* VPI_USER_H */
2 changes: 1 addition & 1 deletion include/slang/codegen/JIT.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ class JIT {
std::unique_ptr<llvm::orc::LLLazyJIT> jit;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/diagnostics/DiagnosticClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class DiagnosticClient {
static string_view getSeverityString(DiagnosticSeverity severity);
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/mir/Instr.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ class BasicBlock {

} // namespace mir

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/mir/MIRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ class MIRBuilder : public BumpAllocator {

} // namespace mir

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/mir/MIRPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ class MIRPrinter {
std::string buffer;
};

} // namespace slang::mir
} // namespace slang::mir
2 changes: 1 addition & 1 deletion include/slang/mir/Procedure.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ class Procedure {

} // namespace mir

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/parsing/LexerFacts.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class LexerFacts {
LexerFacts() = default;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/runtime/Runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ExportList getExportedFunctions();
/// parameter is only valid for the duration of the callback.
void setOutputHandler(function_ref<void(std::string_view)> handler);

} // namespace slang::runtime
} // namespace slang::runtime
2 changes: 1 addition & 1 deletion include/slang/text/Json.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ class JsonWriter {
bool pretty = false;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/Assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ class AssertionException : public std::logic_error {
/// thrown an exception.
[[noreturn]] void assertFailed(const char* expr, const char* file, int line, const char* func);

} // namespace slang::assert
} // namespace slang::assert
2 changes: 1 addition & 1 deletion include/slang/util/Function.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ class function_ref<Ret(Params...)> {
explicit operator bool() const { return callback; }
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/Iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ class iterator_facade {
}
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/SafeIndexedVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ class SafeIndexedVector {
std::deque<Index> freelist;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/ScopeGuard.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ class ScopeGuard {
bool valid = true;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/StackContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ class SmallSet : private StackAllocStorage<Entry, N>,
SmallSet() : BaseType(Alloc(this)) {}
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ inline string_view narrow(string_view str) {

#endif

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/TypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ using detected_or = detail::detector<Default, void, Op, Args...>;
template<template<class...> class Op, class... Args>
constexpr bool is_detected_v = is_detected<Op, Args...>::value;

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion include/slang/util/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class VersionInfo {
static std::string_view getRevision();
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion pyslang/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ requires = [
"ninja; platform_system!='Windows'"
]

build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion source/codegen/CGBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ class CGBuilder : public llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDe
const CodeGenTypes& types;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/codegen/CGExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ llvm::Value* CodeGenFunction::emitNegate(const Type&, mir::MIRValue op) {
return builder.CreateSub(llvm::Constant::getNullValue(val->getType()), val);
}

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/codegen/CGSysCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ llvm::Value* CodeGenFunction::emitSysCall(SysCallKind kind, span<const mir::MIRV
return builder.CreateCall(func, llvm::makeArrayRef(args.data(), args.size()));
}

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/codegen/CodeGenFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ class CodeGenFunction {
SmallVectorSized<LocalVar, 8> locals;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/codegen/CodeGenTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ AlignedType CodeGenTypes::convertType(const Type& type) {
return result;
}

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/codegen/CodeGenTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ class CodeGenTypes {
flat_hash_map<const Type*, AlignedType> typeMap;
};

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/diagnostics/DiagnosticClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ string_view DiagnosticClient::getSeverityString(DiagnosticSeverity severity) {
}
}

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/mir/Instr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ span<const MIRValue> Instr::getOperands() const {
return immOps;
}

} // namespace slang::mir
} // namespace slang::mir
2 changes: 1 addition & 1 deletion source/mir/MIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ const VariableSymbol& MIRBuilder::getGlobal(MIRValue val) const {
return *globals[val.asIndex()];
}

} // namespace slang::mir
} // namespace slang::mir
2 changes: 1 addition & 1 deletion source/mir/MIRPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ MIRPrinter& MIRPrinter::printGlobals() {
return *this;
}

} // namespace slang::mir
} // namespace slang::mir
4 changes: 2 additions & 2 deletions source/runtime/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ void getIOExports(ExportList& results);
ExportList getExportedFunctions() {
ExportList results;
getIOExports(results);

return results;
}

} // namespace simrt
} // namespace simrt
2 changes: 1 addition & 1 deletion source/runtime/SimIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ void getIOExports(ExportList& results) {
#undef ADD
}

} // namespace slang::runtime
} // namespace slang::runtime
2 changes: 1 addition & 1 deletion source/text/Json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ size_t JsonWriter::findLastComma() const {
return size;
}

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/util/Assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ namespace slang::assert {
expr, file, line, func));
}

} // namespace slang::assert
} // namespace slang::assert
2 changes: 1 addition & 1 deletion source/util/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ std::string narrow(std::wstring_view str) {

#endif

} // namespace slang
} // namespace slang
2 changes: 1 addition & 1 deletion source/util/Version.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ string_view VersionInfo::getRevision() {
return "@_build_version@"sv;
}

}
}
2 changes: 1 addition & 1 deletion tests/simtests/BitcodeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
// ret i32 0
//}
//)");
//}
//}
4 changes: 2 additions & 2 deletions tests/snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class C;
extern function int foo(int i = k);
localparam int k = 2;
endclass

function int C::foo(int i);
return i;
endfunction

module m;
C c = new;
initial $display(c.foo());
Expand Down
Loading

0 comments on commit 2b736ff

Please sign in to comment.